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

ruby-changes:40564

From: usa <ko1@a...>
Date: Wed, 18 Nov 2015 20:39:59 +0900 (JST)
Subject: [ruby-changes:40564] usa:r52643 (ruby_2_1): merge revision(s) 52556, 52557: [Backport #10735]

usa	2015-11-18 20:39:53 +0900 (Wed, 18 Nov 2015)

  New Revision: 52643

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

  Log:
    merge revision(s) 52556,52557: [Backport #10735]
    
    * ext/openssl/ossl_pkey.c: Merge ruby/openssl@b9ea8ef [Bug #10735]

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/ext/openssl/ossl_pkey.c
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 52642)
+++ ruby_2_1/ChangeLog	(revision 52643)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Wed Nov 18 20:38:15 2015  Zachary Scott  <zzak@r...>
+
+	* ext/openssl/ossl_pkey.c: Merge ruby/openssl@b9ea8ef [Bug #10735]
+
 Wed Nov 18 20:31:56 2015  Aaron Patterson <tenderlove@r...>
 
 	* ext/openssl/ossl_ssl.c (ossl_ssl_method_tab): Only add SSLv3 support
Index: ruby_2_1/ext/openssl/ossl_pkey.c
===================================================================
--- ruby_2_1/ext/openssl/ossl_pkey.c	(revision 52642)
+++ ruby_2_1/ext/openssl/ossl_pkey.c	(revision 52643)
@@ -275,6 +275,7 @@ ossl_pkey_sign(VALUE self, VALUE digest, https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/openssl/ossl_pkey.c#L275
     EVP_MD_CTX ctx;
     unsigned int buf_len;
     VALUE str;
+    int result;
 
     if (rb_funcall(self, id_private_q, 0, NULL) != Qtrue) {
 	ossl_raise(rb_eArgError, "Private key is needed.");
@@ -284,7 +285,9 @@ ossl_pkey_sign(VALUE self, VALUE digest, https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/openssl/ossl_pkey.c#L285
     StringValue(data);
     EVP_SignUpdate(&ctx, RSTRING_PTR(data), RSTRING_LEN(data));
     str = rb_str_new(0, EVP_PKEY_size(pkey)+16);
-    if (!EVP_SignFinal(&ctx, (unsigned char *)RSTRING_PTR(str), &buf_len, pkey))
+    result = EVP_SignFinal(&ctx, (unsigned char *)RSTRING_PTR(str), &buf_len, pkey);
+    EVP_MD_CTX_cleanup(&ctx);
+    if (!result)
 	ossl_raise(ePKeyError, NULL);
     assert((long)buf_len <= RSTRING_LEN(str));
     rb_str_set_len(str, buf_len);
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 52642)
+++ ruby_2_1/version.h	(revision 52643)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.8"
 #define RUBY_RELEASE_DATE "2015-11-18"
-#define RUBY_PATCHLEVEL 418
+#define RUBY_PATCHLEVEL 419
 
 #define RUBY_RELEASE_YEAR 2015
 #define RUBY_RELEASE_MONTH 11

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r52556-52557


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

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