diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-02-06 14:50:50 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-02-06 14:50:50 +0100 |
commit | 4771ae4b22d2bdef0aafc563570c71d4636a2493 (patch) | |
tree | d115bd7c68b1e6feab68ff6fcd547e0c86c79296 /mysys_ssl | |
parent | 60f51af755ea9d07c20a596ba21de184816fa265 (diff) | |
parent | 0c25e58db6b045df92c209d396031cac5b528bbf (diff) | |
download | mariadb-git-4771ae4b22d2bdef0aafc563570c71d4636a2493.tar.gz |
Merge branch 'github/10.1' into 10.2
Diffstat (limited to 'mysys_ssl')
-rw-r--r-- | mysys_ssl/my_crypt.cc | 15 | ||||
-rw-r--r-- | mysys_ssl/yassl.cc | 1 |
2 files changed, 2 insertions, 14 deletions
diff --git a/mysys_ssl/my_crypt.cc b/mysys_ssl/my_crypt.cc index 92f4012d175..db303f37b0e 100644 --- a/mysys_ssl/my_crypt.cc +++ b/mysys_ssl/my_crypt.cc @@ -323,24 +323,11 @@ unsigned int my_aes_ctx_size(enum my_aes_mode) return MY_AES_CTX_SIZE; } -#ifdef HAVE_YASSL -#include <random.hpp> -int my_random_bytes(uchar* buf, int num) -{ - TaoCrypt::RandomNumberGenerator rand; - rand.GenerateBlock((TaoCrypt::byte*) buf, num); - return MY_AES_OK; -} -#else - int my_random_bytes(uchar *buf, int num) { - RAND_METHOD *rand = RAND_OpenSSL(); - if (rand == NULL || rand->bytes(buf, num) != 1) + if (RAND_bytes(buf, num) != 1) return MY_AES_OPENSSL_ERROR; return MY_AES_OK; } -#endif } - diff --git a/mysys_ssl/yassl.cc b/mysys_ssl/yassl.cc index 23376c82b4f..4e9c21ebfd1 100644 --- a/mysys_ssl/yassl.cc +++ b/mysys_ssl/yassl.cc @@ -26,6 +26,7 @@ #include "aes.hpp" using yaSSL::yaERR_remove_state; +using yaSSL::yaRAND_bytes; #define EVP_CIPH_ECB_MODE 0x1U #define EVP_CIPH_CBC_MODE 0x2U |