ruby-changes:20561
From: emboss <ko1@a...>
Date: Fri, 22 Jul 2011 13:11:47 +0900 (JST)
Subject: [ruby-changes:20561] emboss:r32609 (trunk): * ext/openssl/ossl_hmac.c: Revert checking return type of
emboss 2011-07-22 13:11:38 +0900 (Fri, 22 Jul 2011) New Revision: 32609 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32609 Log: * ext/openssl/ossl_hmac.c: Revert checking return type of HMAC_Init_ex as it is not compatible with OpenSSL < 1.0.0. Modified files: trunk/ChangeLog trunk/ext/openssl/ossl_hmac.c Index: ChangeLog =================================================================== --- ChangeLog (revision 32608) +++ ChangeLog (revision 32609) @@ -1,3 +1,8 @@ +Fri Jul 22 13:03:12 2011 Martin Bosslet <Martin.Bosslet@g...> + + * ext/openssl/ossl_hmac.c: Revert checking return type of + HMAC_Init_ex as it is not compatible with OpenSSL < 1.0.0. + Fri Jul 22 12:10:21 2011 Eric Hodel <drbrain@s...> * tool/rbinstall.rb (default gems): Install executables into the fake Index: ext/openssl/ossl_hmac.c =================================================================== --- ext/openssl/ossl_hmac.c (revision 32608) +++ ext/openssl/ossl_hmac.c (revision 32609) @@ -70,10 +70,8 @@ StringValue(key); GetHMAC(self, ctx); - if (HMAC_Init_ex(ctx, RSTRING_PTR(key), RSTRING_LENINT(key), - GetDigestPtr(digest), NULL) != 1) { - ossl_raise(eHMACError, "HMAC initialization failed."); - } + HMAC_Init(ctx, RSTRING_PTR(key), RSTRING_LENINT(key), + GetDigestPtr(digest)); return self; } @@ -182,9 +180,7 @@ HMAC_CTX *ctx; GetHMAC(self, ctx); - if (HMAC_Init_ex(ctx, NULL, 0, NULL, NULL) != 1) { - ossl_raise(eHMACError, "HMAC initialization failed"); - } + HMAC_Init(ctx, NULL, 0, NULL); return self; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/