Re: Using SSL_CTX_set_min_proto_version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




From: Matt Caswell <matt@xxxxxxxxxxx>
Subject: Re: Using SSL_CTX_set_min_proto_version
Date: April 6, 2021 at 2:13:02 PM EDT


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.
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






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux