diff options
author | Michal Rokos <m.rokos@sh.cvut.cz> | 2002-09-05 11:12:27 +0000 |
---|---|---|
committer | Michal Rokos <m.rokos@sh.cvut.cz> | 2002-09-05 11:12:27 +0000 |
commit | db66e9a4eb183ab7ac5797733fb85ea965ef46da (patch) | |
tree | 67732305f35e749a51cb4ce8d72d687c6c3732db | |
parent | 871d3fb297021cba042602e0c3ba0c1573f9da5e (diff) | |
download | ruby-openssl-history-db66e9a4eb183ab7ac5797733fb85ea965ef46da.tar.gz |
clear OpenSSL error in ossl_raise
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | ossl.c | 1 | ||||
-rwxr-xr-x | test/tc_x509cert.rb | 1 |
3 files changed, 5 insertions, 0 deletions
@@ -3,6 +3,9 @@ ChangeLog for ### CHANGE LOG ### +Thu, 05 Sep 2002 12:16:10 +0100 -- Michal Rokos <m.rokos@sh.cvut.cz> + * ossl.c: clear OpenSSL error in ossl_raise + Wed, 04 Sep 2002 11:20:11 +0100 -- Michal Rokos <m.rokos@sh.cvut.cz> * ossl.c: drop type checking functions, and * ossl.h: rewrite them as macros to ossl.h @@ -144,6 +144,7 @@ ossl_raise(VALUE exc, const char *fmt, ...) } else { len += snprintf(buf + len, BUFSIZ - len, "%s", ERR_reason_error_string(e)); } + ERR_clear_error(); } rb_exc_raise(rb_exc_new(exc, buf, len)); } diff --git a/test/tc_x509cert.rb b/test/tc_x509cert.rb index 62e4a6b..37c2531 100755 --- a/test/tc_x509cert.rb +++ b/test/tc_x509cert.rb @@ -142,6 +142,7 @@ class TC_Certificate < Test::Unit::TestCase def test_12dup assert_equal($x509.to_text, $x509.dup.to_text, "dup") assert_equal($x509.to_text, $x509.clone.to_text, "clone") +## assert_nothing_raised(Certificate::new().dup, "OpenSSL doens't like duplicating not filled X509 *") end def tear_down ## |