diff options
-rw-r--r-- | ext/openssl/openssl_missing.c | 5 | ||||
-rw-r--r-- | ext/openssl/openssl_missing.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ext/openssl/openssl_missing.c b/ext/openssl/openssl_missing.c index 7bd4fb7d9b..5c60852168 100644 --- a/ext/openssl/openssl_missing.c +++ b/ext/openssl/openssl_missing.c @@ -65,15 +65,16 @@ EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in) #endif #if !defined(HAVE_HMAC_CTX_COPY) -void +int HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in) { - if (!out || !in) return; memcpy(out, in, sizeof(HMAC_CTX)); EVP_MD_CTX_copy(&out->md_ctx, &in->md_ctx); EVP_MD_CTX_copy(&out->i_ctx, &in->i_ctx); EVP_MD_CTX_copy(&out->o_ctx, &in->o_ctx); + + return 1; } #endif diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h index 19644afcd4..1e4b2aef93 100644 --- a/ext/openssl/openssl_missing.h +++ b/ext/openssl/openssl_missing.h @@ -34,7 +34,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.1 ***/ |