mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@16422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
22361a3d1c
commit
a8a1114efe
4 changed files with 70 additions and 15 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue