diff options
author | emboss <emboss@ruby-lang.org> | 2011-06-22 08:41:08 +0000 |
---|---|---|
committer | emboss <emboss@ruby-lang.org> | 2011-06-22 08:41:08 +0000 |
commit | 855f38757e7d5bab36ed984b96010f75bc8bfa2a (patch) | |
tree | 83a6c8f6f29e5707cdb5d3969b5c693b84cc922f /ext/openssl/ossl_pkey_dh.c | |
parent | 785e89f52ab00a9202ae69be1e0bbb73cb5dd0eb (diff) | |
download | ruby-openssl-history-855f38757e7d5bab36ed984b96010f75bc8bfa2a.tar.gz |
* ext/openssl/ossl.h: Introduced OSSL_BIO_reset macro for PEM/DER
fallback scenarios.
* ext/openssl/ossl_pkey_dsa.c
* ext/openssl/ossl_x509req.c
* ext/openssl/ossl_pkey_rsa.c
* ext/openssl/ossl_pkey_ec.c
* ext/openssl/ossl_ssl_session.c
* ext/openssl/ossl_x509crl.c
* ext/openssl/ossl_pkey.c
* ext/openssl/ossl_pkey_dh.c
* ext/openssl/ossl_x509cert.c
* ext/openssl/ossl_pkcs7.c: Use OSSL_BIO_reset.
* ext/openssl/ossl_ssl.c
* ext/openssl/ossl_cipher.c
* ext/openssl/ossl_pkey_ec.c
* ext/openssl/ossl_pkcs12.c
* ext/openssl/ossl_ssl_session.c: Replace rb_raise occurences by
ossl_raise. This automatically flushes OpenSSL's error queue.
* ext/openssl/ossl_pkcs7.c: Raise error if DER fallback for parsing
fails.
* test/openssl/test_pkey_ec.rb
* test/openssl/test_pkey_dsa.rb
* test/openssl/test_pkey_rsa.rb: Add assertions that OpenSSL.errors is
empty.
* test/openssl/test_pkey_rsa.rb: Remove initial OpenSSL.errors call in
test_new.
[ Ruby 1.9 - Bug #4885 ] [ruby-core:37134]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_pkey_dh.c')
-rw-r--r-- | ext/openssl/ossl_pkey_dh.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/openssl/ossl_pkey_dh.c b/ext/openssl/ossl_pkey_dh.c index d0faef5..dd56458 100644 --- a/ext/openssl/ossl_pkey_dh.c +++ b/ext/openssl/ossl_pkey_dh.c @@ -180,13 +180,11 @@ ossl_dh_initialize(int argc, VALUE *argv, VALUE self) in = ossl_obj2bio(arg); dh = PEM_read_bio_DHparams(in, NULL, NULL, NULL); if (!dh){ - (void)BIO_reset(in); - (void)ERR_get_error(); + OSSL_BIO_reset(in); dh = d2i_DHparams_bio(in, NULL); } BIO_free(in); if (!dh) { - (void)ERR_get_error(); ossl_raise(eDHError, NULL); } } |