1 #ifndef __OPENSSL_COPMAT__H__
2 #define __OPENSSL_COPMAT__H__
4 #if (OPENSSL_VERSION_NUMBER < 0x10100000L)
5 static inline int EVP_PKEY_up_ref(EVP_PKEY *pkey)
7 CRYPTO_add(&pkey->references, 1, CRYPTO_LOCK_EVP_PKEY);
11 static inline void EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx)
13 EVP_CIPHER_CTX_init(ctx);
16 static inline void EVP_MD_CTX_reset(EVP_MD_CTX *ctx)
21 static inline EVP_MD_CTX *EVP_MD_CTX_new(void)
25 ctx = (EVP_MD_CTX *)OPENSSL_malloc(sizeof(EVP_MD_CTX));
27 memset(ctx, 0, sizeof(EVP_MD_CTX));
31 static inline void EVP_MD_CTX_free(EVP_MD_CTX *ctx)
33 EVP_MD_CTX_reset(ctx);
37 static inline const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *asn1)