summaryrefslogtreecommitdiff
path: root/lang/ruby18-base/patches/patch-de
blob: 88f9c900e92466d45c43babca7c7036b1b80fcac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$NetBSD: patch-de,v 1.1 2008/05/14 10:09:00 taca Exp $

--- ext/openssl/openssl_missing.c.orig	2007-02-13 08:01:19.000000000 +0900
+++ 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 */