diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-05-05 15:53:08 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-05-14 20:00:57 +0900 |
commit | edd65f93b6d1bc3cd60b585bec172fd6ff58908d (patch) | |
tree | 7f0fcb547279faeb86f04415bd29a4651f118d91 /ext/openssl/openssl_missing.h | |
parent | 4569e71bd3b7fb9202b5fad866b05764e62e6119 (diff) | |
download | ruby-edd65f93b6d1bc3cd60b585bec172fd6ff58908d.tar.gz |
ext/openssl: use HMAC_CTX_{new,free,reset} to allocate HMAC_CTX
HMAC_CTX is made opaque in OpenSSL 1.1.0
Diffstat (limited to 'ext/openssl/openssl_missing.h')
-rw-r--r-- | ext/openssl/openssl_missing.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h index 1261d78a79..f9365124c5 100644 --- a/ext/openssl/openssl_missing.h +++ b/ext/openssl/openssl_missing.h @@ -30,7 +30,7 @@ int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in); #endif #if !defined(HAVE_HMAC_CTX_COPY) -void HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in); +int HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in); #endif /* added in 1.0.2 */ @@ -48,6 +48,18 @@ int CRYPTO_memcmp(const volatile void * volatile in_a, const volatile void * vol #endif /* added in 1.1.0 */ +#if !defined(HAVE_HMAC_CTX_NEW) +HMAC_CTX *HMAC_CTX_new(void); +#endif + +#if !defined(HAVE_HMAC_CTX_FREE) +void HMAC_CTX_free(HMAC_CTX *ctx); +#endif + +#if !defined(HAVE_HMAC_CTX_RESET) +int HMAC_CTX_reset(HMAC_CTX *ctx); +#endif + #if !defined(HAVE_X509_STORE_GET_EX_DATA) # define X509_STORE_get_ex_data(x, idx) \ CRYPTO_get_ex_data(&(x)->ex_data, idx) |