Skip to content

Commit 0d20ed9

Browse files
committed
MDEV-35580 Server using WolfSSL shows different name than OpenSSL for some ciphers
emulate OpenSSL behavior in WolfSSL: * use IANA cipher names (TLS_ prefix, underscore) for TLSv1.3 e.g. TLS_AES_256_GCM_SHA384 * use OpenSSL names (no previx, dash) otherwise e.g. AES256-GCM-SHA384
1 parent 04122ed commit 0d20ed9

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

include/ssl_compat.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
#ifdef HAVE_WOLFSSL
5656
#undef ERR_remove_state
5757
#define ERR_remove_state(x) do {} while(0)
58+
#undef SSL_get_cipher
59+
#define SSL_get_cipher(ssl) (SSL_version(ssl) == TLS1_3_VERSION ? wolfSSL_get_cipher(ssl) : wolfSSL_get_cipher_name(ssl))
5860
#elif defined (HAVE_ERR_remove_thread_state)
5961
#define ERR_remove_state(X) ERR_remove_thread_state(NULL)
6062
#endif /* HAVE_ERR_remove_thread_state */
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# MDEV-35580 Server using WolfSSL shows different name than OpenSSL for some ciphers
3+
#
4+
connect c,localhost,root,,,,,SSL;
5+
show status like 'ssl_cipher';
6+
Variable_name Value
7+
Ssl_cipher TLS_AES_256_GCM_SHA384
8+
show status like 'ssl_version';
9+
Variable_name Value
10+
Ssl_version TLSv1.3
11+
# End of 10.11 tests
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--source include/have_ssl_communication.inc
2+
--source include/have_tlsv13.inc
3+
--echo #
4+
--echo # MDEV-35580 Server using WolfSSL shows different name than OpenSSL for some ciphers
5+
--echo #
6+
connect c,localhost,root,,,,,SSL;
7+
8+
show status like 'ssl_cipher';
9+
show status like 'ssl_version';
10+
11+
--echo # End of 10.11 tests

0 commit comments

Comments
 (0)