diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-15 09:44:38 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-15 09:44:38 +0000 |
| commit | d73a64e12b9118c2003e7c0b03adc40c318b2934 (patch) | |
| tree | 7434202f1e7dd6bb683cb93a5f05d038a981c2da /ext/openssl/openssl_missing.c | |
| parent | a3f81d383c3ef9f8bd8f9b6a431e83e8f9b6c363 (diff) | |
| download | ruby-d73a64e12b9118c2003e7c0b03adc40c318b2934.tar.gz ruby-d73a64e12b9118c2003e7c0b03adc40c318b2934.tar.xz ruby-d73a64e12b9118c2003e7c0b03adc40c318b2934.zip | |
* ext/openssl/openssl_missing.c (HMAC_CTX_copy): adopted to
prototype change in openssl bundled with newer OpenBSD.
a patch from Takahiro Kambe <taca at back-street.net> in
[ruby-dev:34691].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/openssl_missing.c')
| -rw-r--r-- | ext/openssl/openssl_missing.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ext/openssl/openssl_missing.c b/ext/openssl/openssl_missing.c index f77731ed6..724f36b8a 100644 --- a/ext/openssl/openssl_missing.c +++ b/ext/openssl/openssl_missing.c @@ -22,17 +22,15 @@ #include "openssl_missing.h" #if !defined(HAVE_HMAC_CTX_COPY) -int +void HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in) { - if (!out || !in) return 0; + if (!out || !in) return; memcpy(out, in, sizeof(HMAC_CTX)); - if (!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 0; - return 1; + 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); } #endif /* HAVE_HMAC_CTX_COPY */ #endif /* NO_HMAC */ |
