/* Copyright (c) 2014 Google Inc. Copyright (c) 2014, 2015 MariaDB Corporation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MY_CRYPT_INCLUDED #define MY_CRYPT_INCLUDED #include /* HAVE_EncryptAes128{Ctr,Gcm} */ #include /* OpenSSL version specific definitions */ #if !defined(HAVE_YASSL) && defined(OPENSSL_VERSION_NUMBER) #if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) #define ERR_remove_state(X) #else #define EVP_CIPHER_CTX_reset(X) EVP_CIPHER_CTX_cleanup(X) #define RAND_OpenSSL() RAND_SSLeay(); #if defined(HAVE_ERR_remove_thread_state) #define ERR_remove_state(X) ERR_remove_thread_state(NULL) #endif #endif #elif defined(HAVE_YASSL) #define EVP_CIPHER_CTX_reset(X) EVP_CIPHER_CTX_cleanup(X) #endif /* !defined(HAVE_YASSL) */ #endif /* MY_CRYPT_INCLUDED */