Skip to content

Commit

Permalink
Fix SCRAM-*-PLUS SASL mechanisms with OpenSSL and TLSv1.2
Browse files Browse the repository at this point in the history
Signed-off-by: Steffen Jaeckel <[email protected]>
  • Loading branch information
sjaeckel committed Feb 21, 2024
1 parent 1cf09b1 commit d3e4b31
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/tls_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,15 +753,19 @@ int tls_init_channel_binding(tls_t *tls,

switch (SSL_version(tls->ssl)) {
case SSL3_VERSION:
*binding_prefix = "tls-unique";
*binding_prefix_len = strlen("tls-unique");
tls->channel_binding_size = 36;
break;
/* In theory the 'tls-unique' channel binding for SSLv3 would be 36
* bytes long, but:
* Attempting to use [SSL_export_keying_material] in
* SSLv3 will result in an error.
*/
return -1;
case TLS1_VERSION:
case TLS1_1_VERSION:
case TLS1_2_VERSION:
*binding_prefix = "tls-unique";
*binding_prefix_len = strlen("tls-unique");
label = "master secret";
labellen = 13;
tls->channel_binding_size = 12;
break;
#ifdef TLS1_3_VERSION
Expand Down

0 comments on commit d3e4b31

Please sign in to comment.