OpenSSL_legacy.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
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