diff --git a/IDE/MYSQL/CMakeLists_wolfCrypt.txt b/IDE/MYSQL/CMakeLists_wolfCrypt.txt index 49953507a..ed368747b 100644 --- a/IDE/MYSQL/CMakeLists_wolfCrypt.txt +++ b/IDE/MYSQL/CMakeLists_wolfCrypt.txt @@ -27,9 +27,9 @@ SET(WOLFCRYPT_SOURCES src/aes.c src/arc4.c src/asn.c src/blake2b.c src/camellia.c src/chacha.c src/coding.c src/compress.c src/des3.c src/dh.c src/dsa.c src/ecc.c src/error.c src/hc128.c src/hmac.c src/integer.c src/logging.c src/md2.c src/md4.c src/md5.c src/memory.c - src/pkcs7.c src/poly1305.c src/pwdbased.c src/rabbit.c + src/pkcs7.c src/pkcs12.c src/poly1305.c src/pwdbased.c src/rabbit.c src/random.c src/ripemd.c src/rsa.c src/sha.c src/sha256.c src/sha512.c - src/tfm.c src/wc_port.c src/wc_encrypt.c src/hash.c + src/tfm.c src/wc_port.c src/wc_encrypt.c src/hash.c src/wolfmath.c ../wolfssl/wolfcrypt/aes.h ../wolfssl/wolfcrypt/arc4.h ../wolfssl/wolfcrypt/asn.h ../wolfssl/wolfcrypt/blake2.h ../wolfssl/wolfcrypt/camellia.h ../wolfssl/wolfcrypt/chacha.h ../wolfssl/wolfcrypt/coding.h ../wolfssl/wolfcrypt/compress.h ../wolfssl/wolfcrypt/des3.h ../wolfssl/wolfcrypt/dh.h ../wolfssl/wolfcrypt/dsa.h ../wolfssl/wolfcrypt/ecc.h ../wolfssl/wolfcrypt/error-crypt.h ../wolfssl/wolfcrypt/hc128.h ../wolfssl/wolfcrypt/hmac.h @@ -42,7 +42,6 @@ SET(WOLFCRYPT_SOURCES src/aes.c src/arc4.c src/asn.c src/blake2b.c # misc.c is not compiled in since using INLINE ADD_CONVENIENCE_LIBRARY(wolfcrypt ${WOLFCRYPT_SOURCES}) -RESTRICT_SYMBOL_EXPORTS(wolfcrypt) IF(MSVC) INSTALL_DEBUG_TARGET(wolfcrypt DESTINATION ${INSTALL_LIBDIR}/debug) diff --git a/IDE/MYSQL/CMakeLists_wolfSSL.txt b/IDE/MYSQL/CMakeLists_wolfSSL.txt index d3b205e5c..4f15e1f3f 100644 --- a/IDE/MYSQL/CMakeLists_wolfSSL.txt +++ b/IDE/MYSQL/CMakeLists_wolfSSL.txt @@ -35,7 +35,6 @@ SET(WOLFSSL_SOURCES src/crl.c src/internal.c src/keys.c src/sniffer.c ../../client/get_password.c ) ADD_CONVENIENCE_LIBRARY(wolfssl ${WOLFSSL_SOURCES}) -RESTRICT_SYMBOL_EXPORTS(wolfssl) IF(MSVC) INSTALL_DEBUG_TARGET(wolfssl DESTINATION ${INSTALL_LIBDIR}/debug) diff --git a/src/ssl.c b/src/ssl.c index b8b80b6ce..383044fc6 100755 --- a/src/ssl.c +++ b/src/ssl.c @@ -634,6 +634,33 @@ char* wolfSSL_get_cipher_list(int priority) } +/** + * Get the name of cipher at priority level passed in. + */ +char* wolfSSL_get_cipher_list_ex(WOLFSSL* ssl, int priority) +{ + + if (ssl == NULL) { + return NULL; + } + else { + const char* cipher; + + if ((cipher = wolfSSL_get_cipher_name_internal(ssl)) != NULL) { + if (priority == 0) { + return (char*)cipher; + } + else { + return NULL; + } + } + else { + return wolfSSL_get_cipher_list(priority); + } + } +} + + int wolfSSL_get_ciphers(char* buf, int len) { const char* const* ciphers = GetCipherNames(); diff --git a/wolfssl/openssl/ssl.h b/wolfssl/openssl/ssl.h index c00c8fe6c..4091826d1 100644 --- a/wolfssl/openssl/ssl.h +++ b/wolfssl/openssl/ssl.h @@ -98,8 +98,8 @@ typedef WOLFSSL_X509_STORE_CTX X509_STORE_CTX; #define SSL_get_client_random(ssl,out,outSz) \ wolfSSL_get_client_random((ssl),(out),(outSz)) -#define SSL_get_cipher_list(ctx,i) wolfSSL_get_cipher_list((i)) -#define SSL_get_cipher_name(ctx) wolfSSL_get_cipher((ctx)) +#define SSL_get_cipher_list(ctx,i) wolfSSL_get_cipher_list_ex((ctx),(i)) +#define SSL_get_cipher_name(ctx) wolfSSL_get_cipher((ctx)) #define SSL_get_shared_ciphers(ctx,buf,len) \ wolfSSL_get_shared_ciphers((ctx),(buf),(len)) diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index 42750e788..4d64977df 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -388,6 +388,7 @@ WOLFSSL_API int wolfSSL_set_fd (WOLFSSL*, int); WOLFSSL_API int wolfSSL_set_write_fd (WOLFSSL*, int); WOLFSSL_API int wolfSSL_set_read_fd (WOLFSSL*, int); WOLFSSL_API char* wolfSSL_get_cipher_list(int priority); +WOLFSSL_API char* wolfSSL_get_cipher_list_ex(WOLFSSL* ssl, int priority); WOLFSSL_API int wolfSSL_get_ciphers(char*, int); WOLFSSL_API const char* wolfSSL_get_cipher_name(WOLFSSL* ssl); WOLFSSL_API const char* wolfSSL_get_shared_ciphers(WOLFSSL* ssl, char* buf,