diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2019-02-13 09:08:06 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2019-05-22 13:48:25 +0200 |
commit | 5e4b657dd44dce601c91bc77a41f6e382bc32000 (patch) | |
tree | e0c7442136ceb243768ed108db56051fd37a5762 /mysys/my_rnd.c | |
parent | 31fe70290c54c44231aed881f5138924f32e47c5 (diff) | |
download | mariadb-git-5e4b657dd44dce601c91bc77a41f6e382bc32000.tar.gz |
MDEV-18531 : Use WolfSSL instead of YaSSL as "bundled" SSL/encryption library
- Add new submodule for WolfSSL
- Build and use wolfssl and wolfcrypt instead of yassl/taocrypt
- Use HAVE_WOLFSSL instead of HAVE_YASSL
- Increase MY_AES_CTX_SIZE, to avoid compile time asserts in my_crypt.cc
(sizeof(EVP_CIPHER_CTX) is larger on WolfSSL)
Diffstat (limited to 'mysys/my_rnd.c')
-rw-r--r-- | mysys/my_rnd.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/mysys/my_rnd.c b/mysys/my_rnd.c index c38682a2012..0af251b4ade 100644 --- a/mysys/my_rnd.c +++ b/mysys/my_rnd.c @@ -78,20 +78,11 @@ double my_rnd(struct my_rnd_struct *rand_st) double my_rnd_ssl(struct my_rnd_struct *rand_st) { - -#if defined(HAVE_YASSL) || defined(HAVE_OPENSSL) - int rc; - unsigned int res; - -#if defined(HAVE_YASSL) - rc= yaSSL::RAND_bytes((unsigned char *) &res, sizeof (unsigned int)); -#else +#if defined(HAVE_OPENSSL) rc= RAND_bytes((unsigned char *) &res, sizeof (unsigned int)); -#endif /* HAVE_YASSL */ - if (rc) return (double)res / (double)UINT_MAX; -#endif /* defined(HAVE_YASSL) || defined(HAVE_OPENSSL) */ +#endif /* defined(HAVE_OPENSSL) */ return my_rnd(rand_st); } |