Using SSL_CTX_set_min_proto_version

Tamara Kogan tkogan at cincom.com
Wed Apr 7 14:22:13 UTC 2021


> From: Matt Caswell <matt at openssl.org>
> Subject: Re: Using SSL_CTX_set_min_proto_version
> Date: April 6, 2021 at 2:13:02 PM EDT
> To: openssl-users at openssl.org
> 
> 
> On 06/04/2021 18:45, Tamara Kogan via openssl-users wrote:
>> Hello,
>>  In our client application we are trying to set TLS 1.2 in ClientHello message. The OpenSSL version is 1.1.1h
>> We use the function
>> SSL_CTX_set_min_proto_version(ssl->ctx, TLS1_2_VERSION);
>> If I test the version right after setting it does return 1.2
>> SSL_CTX_get_proto_version(ssl->ctx) == TLS1_2_VERSION
>> But the ClientHello is still created with TLS 1.0
>> (16 03 01 01 42…)
>> Any explanation why the ClientHello message ignores min TLS version?
>> Any suggestion how to enforce 1.2 version?
> 
> You are looking at the *record layer* TLS version. This is always 1.0 in the ClientHello, regardless of what TLS protocol version is actually being requested. TLS protocol version fields are a bit of a minefield of confusion and unexpected behaviour. For example in an OpenSSL TLSv1.3 ClientHello the record layer protocol version will be set to TLSv1.0, the ClientHello message itself will have the protocol version set to TLSv1.2, and the supported versions extension will list the actual supported versions (i.e. in your case it would be  TLSv1.3 and TLSv1.2).
> 
> Matt
> 

I have not found any confirmation in TLS specs that the “record layer” version must be 1.0.
TLS 1.1 https://tools.ietf.org/html/rfc4346#appendix-A.1
TLS 1.2 https://tools.ietf.org/html/rfc5246#appendix-A.1
TLS 1.3  https://tools.ietf.org/html/rfc8446#appendix-B.1
Our client failed to connect to a mail server when the server changed settings and limited  TLS versions to  1.2 only. The server parsed the first three bytes of ClientHello, detected 1.0 version and closed the connection. Then it was a half of a day debugging OpenSSL in attempt to understand why SSL_CTX_set_min_proto_version doesn’t make any difference.
Now the server was updated and it still doesn’t accept ClientHello with 1.0 but at least the server sends “ChangeCipherSpec Message” message and the client resends ClientHello with 1.2.
As a result in order to be connected the client has an extra message exchange.
From my point of view the “Record Layer” ProtocolVersion has to be settable.
Tamara





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20210407/aa136c99/attachment.html>


More information about the openssl-users mailing list