diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-04-20 17:22:09 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-04-27 23:07:41 +0900 |
commit | 73cdcd19945e7306e473095fdd617a388c4b2612 (patch) | |
tree | b33586da15f9ef98767179c32af1f730055e3418 /ext/openssl/openssl_missing.c | |
parent | e9cc5e209b520a87f05f994b2961da0ac0fd1e6d (diff) | |
download | ruby-73cdcd19945e7306e473095fdd617a388c4b2612.tar.gz |
ext/openssl: the return type of HMAC_CTX_copy() is int
Diffstat (limited to 'ext/openssl/openssl_missing.c')
-rw-r--r-- | ext/openssl/openssl_missing.c | 5 |
1 files changed, 3 insertions, 2 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 |