OpenSSL_legacy.h

Go to the documentation of this file.
00001 /*
00002  * Distributed under the OpenDDS License.
00003  * See: http://www.opendds.org/license.html
00004  */
00005 
00006 /**
00007  * Macros and other helpers to allow OpenDDS Security library to work with
00008  * OpenSSL 1.0, as it was written to use OpenSSL 1.1.
00009  */
00010 
00011 #ifndef OPENSSL_LEGACY_H
00012 #define OPENSSL_LEGACY_H
00013 
00014 #if OPENSSL_VERSION_NUMBER < 0x10100000L
00015 
00016 #define OPENSSL_V_1_0
00017 
00018 #define EVP_MD_CTX_new EVP_MD_CTX_create
00019 #define EVP_MD_CTX_free EVP_MD_CTX_destroy
00020 #define EVP_CTRL_AEAD_GET_TAG EVP_CTRL_CCM_GET_TAG
00021 
00022 inline int RSA_bits(const RSA* r)
00023 {
00024   return BN_num_bits(r->n);
00025 }
00026 
00027 inline void DH_get0_key(const DH* dh, const BIGNUM** pub_key, const BIGNUM** priv_key)
00028 {
00029   if (pub_key) {
00030     *pub_key = dh->pub_key;
00031   }
00032   if (priv_key) {
00033     *priv_key = dh->priv_key;
00034   }
00035 }
00036 
00037 #endif // OPENSSL_VERSION_NUMBER < 0x10100000L
00038 
00039 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1