ruby-changes:19749
From: yugui <ko1@a...>
Date: Mon, 30 May 2011 07:53:25 +0900 (JST)
Subject: [ruby-changes:19749] yugui:r31795 (ruby_1_9_2): merges r31242 from trunk into ruby_1_9_2.
yugui 2011-05-30 07:49:02 +0900 (Mon, 30 May 2011) New Revision: 31795 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31795 Log: merges r31242 from trunk into ruby_1_9_2. -- * ext/openssl/ossl_pkey_rsa.c (ossl_rsa_initialize): pop pushed error after each try of reading. fixes #4550 Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/ext/openssl/ossl_pkey_rsa.c branches/ruby_1_9_2/version.h Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 31794) +++ ruby_1_9_2/ChangeLog (revision 31795) @@ -1,3 +1,8 @@ +Wed Apr 6 11:36:44 2011 NARUSE, Yui <naruse@r...> + + * ext/openssl/ossl_pkey_rsa.c (ossl_rsa_initialize): + pop pushed error after each try of reading. fixes #4550 + Mon Apr 4 21:41:26 2011 KOSAKI Motohiro <kosaki.motohiro@g...> * io.c (rb_io_syswrite): While local FS writes are usually Index: ruby_1_9_2/ext/openssl/ossl_pkey_rsa.c =================================================================== --- ruby_1_9_2/ext/openssl/ossl_pkey_rsa.c (revision 31794) +++ ruby_1_9_2/ext/openssl/ossl_pkey_rsa.c (revision 31795) @@ -152,26 +152,34 @@ rsa = PEM_read_bio_RSAPrivateKey(in, NULL, ossl_pem_passwd_cb, passwd); if (!rsa) { (void)BIO_reset(in); + (void)ERR_get_error(); rsa = PEM_read_bio_RSAPublicKey(in, NULL, NULL, NULL); } if (!rsa) { (void)BIO_reset(in); + (void)ERR_get_error(); rsa = PEM_read_bio_RSA_PUBKEY(in, NULL, NULL, NULL); } if (!rsa) { (void)BIO_reset(in); + (void)ERR_get_error(); rsa = d2i_RSAPrivateKey_bio(in, NULL); } if (!rsa) { (void)BIO_reset(in); + (void)ERR_get_error(); rsa = d2i_RSAPublicKey_bio(in, NULL); } if (!rsa) { (void)BIO_reset(in); + (void)ERR_get_error(); rsa = d2i_RSA_PUBKEY_bio(in, NULL); } BIO_free(in); - if (!rsa) ossl_raise(eRSAError, "Neither PUB key nor PRIV key:"); + if (!rsa) { + (void)ERR_get_error(); + ossl_raise(eRSAError, "Neither PUB key nor PRIV key:"); + } } if (!EVP_PKEY_assign_RSA(pkey, rsa)) { RSA_free(rsa); Index: ruby_1_9_2/version.h =================================================================== --- ruby_1_9_2/version.h (revision 31794) +++ ruby_1_9_2/version.h (revision 31795) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 222 +#define RUBY_PATCHLEVEL 223 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/