From: Yuri <yuri@rawbw.com>
To: cygwin@cygwin.com
Subject: Re: OpenSSL failure in Cygwin: SSL_set_tlsext_host_name returns 1 (SSL_TLSEXT_ERR_ALERT_WARNING)
Date: Mon, 8 May 2023 10:25:25 -0700 [thread overview]
Message-ID: <50324d46-b8e3-505b-1994-3cbeb754f064@tsoft.com> (raw)
In-Reply-To: <70c086a9-4c9f-7cb3-f53a-86c4f9c2d056@Shaw.ca>
On 5/8/23 08:31, Brian Inglis wrote:
> Which Cygwin, ssl/tls-devel libraries, and ca-certificates... packages
> and versions are you using?
libssl-devel-1.1.1t-1
openssl-1.1.1t-1
ca-certificates-2021.2.60-1
>
> $ man SSL_set_tlsext_host_name
>
> says SSL_set_tlsext_host_name etc. returns 1 for success, 0 for failure?
Yes. It looks like there is a coding error that they don't just check
for 0 or 1, and check for 0 as a sign of success.
But this code, amazingly, works flawlessly on Linux/BSD.
>
> Web search TLS SNI and you will find that either the host presents a
> list of certs none of which match the host name you are connecting to,
> a matching cert cannot be validated, possibly due to a missing CA
> chain, or one end could not handle the list presented or cert matched;
> some hits offer diagnostic suggestions.
>
This program has a special variable no_check_cert_flag that allows to
disable certificate check:
https://github.com/proxytunnel/proxytunnel/blob/master/ptstream.c#L356
In my case the certificate is self-signed and this variable is activated.
On Linux the same invocation doesn't cause such failure.
Is this code incorrect?
I will report the incorrect use of SSL_set_tlsext_host_name to proxytunnel.
Yuri
next prev parent reply other threads:[~2023-05-08 17:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-08 7:31 Yuri
2023-05-08 10:12 ` Andrey Repin
2023-05-08 15:31 ` Brian Inglis
2023-05-08 17:25 ` Yuri [this message]
2023-05-08 17:40 ` Achim Gratz
2023-05-08 17:50 ` Yuri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50324d46-b8e3-505b-1994-3cbeb754f064@tsoft.com \
--to=yuri@rawbw.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).