summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_pkcs7.c
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-26 12:06:39 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-26 12:06:39 +0000
commit270ba8d81e79d18d212517cee9094670656706ff (patch)
treea3f37692b026b7bfb23f35987f5c389093fbb195 /ext/openssl/ossl_pkcs7.c
parentd4b775fe45120af2bbc7e52a6cd4187460ee3bcc (diff)
* ext/openssl/ossl_pkcs7.c (ossl_pkcs7_verify): should clear error.
(fix http://bugs.debian.org/394336) * ext/openssl/ossl_ns_spki.c (ossl_spki_initialize): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_pkcs7.c')
-rw-r--r--ext/openssl/ossl_pkcs7.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/openssl/ossl_pkcs7.c b/ext/openssl/ossl_pkcs7.c
index 8fa2824..04dd0d8 100644
--- a/ext/openssl/ossl_pkcs7.c
+++ b/ext/openssl/ossl_pkcs7.c
@@ -667,8 +667,10 @@ ossl_pkcs7_verify(int argc, VALUE *argv, VALUE self)
}
ok = PKCS7_verify(p7, x509s, x509st, in, out, flg);
BIO_free(in);
+ if (ok < 0) ossl_raise(ePKCS7Error, NULL);
msg = ERR_reason_error_string(ERR_get_error());
ossl_pkcs7_set_err_string(self, msg ? rb_str_new2(msg) : Qnil);
+ ERR_clear_error();
data = ossl_membio2str(out);
ossl_pkcs7_set_data(self, data);
sk_X509_pop_free(x509s, X509_free);