[前][次][番号順一覧][スレッド一覧]

ruby-changes:24075

From: shyouhei <ko1@a...>
Date: Mon, 18 Jun 2012 18:56:19 +0900 (JST)
Subject: [ruby-changes:24075] shyouhei:r36126 (ruby_1_8_7): merge revision(s) 32605:32610:

shyouhei	2012-06-18 18:53:29 +0900 (Mon, 18 Jun 2012)

  New Revision: 36126

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36126

  Log:
    merge revision(s) 32605:32610:
    * backport r32609 from trunk.
    * ext/openssl/ossl_hmac.c: Revert checking return type of
      HMAC_Init_ex as it is not compatible with OpenSSL < 1.0.0.
    * backport r32606 from trunk.
    * ext/openssl/ossl_digest.c: Check return value of EVP_DigestInit_ex.
    * ext/openssl/ossl_hmac.c: Check return value of HMAC_Init_ex.
      Thanks, Jared Jennings, for the patch.
      [ Ruby 1.9 - Bug #4944 ] [ruby-core:37670]

  Modified files:
    branches/ruby_1_8_7/ChangeLog
    branches/ruby_1_8_7/ext/openssl/ossl_digest.c
    branches/ruby_1_8_7/version.h

Index: ruby_1_8_7/ext/openssl/ossl_digest.c
===================================================================
--- ruby_1_8_7/ext/openssl/ossl_digest.c	(revision 36125)
+++ ruby_1_8_7/ext/openssl/ossl_digest.c	(revision 36126)
@@ -62,7 +62,9 @@
 
     ret = ossl_digest_alloc(cDigest);
     GetDigest(ret, ctx);
-    EVP_DigestInit_ex(ctx, md, NULL);
+    if (EVP_DigestInit_ex(ctx, md, NULL) != 1) {
+	ossl_raise(eDigestError, "Digest initialization failed.");
+    }
    
     return ret;
 }
@@ -104,7 +106,9 @@
     if (!NIL_P(data)) StringValue(data);
 
     GetDigest(self, ctx);
-    EVP_DigestInit_ex(ctx, md, NULL);
+    if (EVP_DigestInit_ex(ctx, md, NULL) != 1) {
+	ossl_raise(eDigestError, "Digest initialization failed.");
+    }
     
     if (!NIL_P(data)) return ossl_digest_update(self, data);
     return self;
@@ -138,7 +142,9 @@
     EVP_MD_CTX *ctx;
 
     GetDigest(self, ctx);
-    EVP_DigestInit_ex(ctx, EVP_MD_CTX_md(ctx), NULL);
+    if (EVP_DigestInit_ex(ctx, EVP_MD_CTX_md(ctx), NULL) != 1) {
+	ossl_raise(eDigestError, "Digest initialization failed.");
+    }
 
     return self;
 }
Index: ruby_1_8_7/ChangeLog
===================================================================
--- ruby_1_8_7/ChangeLog	(revision 36125)
+++ ruby_1_8_7/ChangeLog	(revision 36126)
@@ -1,3 +1,19 @@
+Mon Jun 18 18:32:43 2012  Martin Bosslet  <Martin.Bosslet@g...>
+
+	* backport r32609 from trunk.
+
+	* ext/openssl/ossl_hmac.c: Revert checking return type of
+	  HMAC_Init_ex as it is not compatible with OpenSSL < 1.0.0.
+
+Mon Jun 18 18:32:43 2012  Martin Bosslet  <Martin.Bosslet@g...>
+
+	* backport r32606 from trunk.
+
+	* ext/openssl/ossl_digest.c: Check return value of EVP_DigestInit_ex.
+	* ext/openssl/ossl_hmac.c: Check return value of HMAC_Init_ex.
+	  Thanks, Jared Jennings, for the patch.
+	  [ Ruby 1.9 - Bug #4944 ] [ruby-core:37670]
+
 Sun Jun 10 03:00:21 2012  Nobuyoshi Nakada  <nobu@r...>
 
 	* eval.c (ruby_setjmp): need to save the stack after r2 (the Table
Index: ruby_1_8_7/version.h
===================================================================
--- ruby_1_8_7/version.h	(revision 36125)
+++ ruby_1_8_7/version.h	(revision 36126)
@@ -1,15 +1,15 @@
 #define RUBY_VERSION "1.8.7"
-#define RUBY_RELEASE_DATE "2012-06-10"
+#define RUBY_RELEASE_DATE "2012-06-18"
 #define RUBY_VERSION_CODE 187
-#define RUBY_RELEASE_CODE 20120610
-#define RUBY_PATCHLEVEL 368
+#define RUBY_RELEASE_CODE 20120618
+#define RUBY_PATCHLEVEL 369
 
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 8
 #define RUBY_VERSION_TEENY 7
 #define RUBY_RELEASE_YEAR 2012
 #define RUBY_RELEASE_MONTH 6
-#define RUBY_RELEASE_DAY 10
+#define RUBY_RELEASE_DAY 18
 
 #ifdef RUBY_EXTERN
 RUBY_EXTERN const char ruby_version[];

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]