mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
d4b775fe45
commit
270ba8d81e
3 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Thu Oct 26 21:05:48 2006 GOTOU Yuuzou <gotoyuzo@notwork.org>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
Thu Oct 26 15:23:47 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Thu Oct 26 15:23:47 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* enumerator.c: remove by_slice and by_cons.
|
* enumerator.c: remove by_slice and by_cons.
|
||||||
|
|
|
@ -70,6 +70,7 @@ ossl_spki_initialize(int argc, VALUE *argv, VALUE self)
|
||||||
}
|
}
|
||||||
NETSCAPE_SPKI_free(DATA_PTR(self));
|
NETSCAPE_SPKI_free(DATA_PTR(self));
|
||||||
DATA_PTR(self) = spki;
|
DATA_PTR(self) = spki;
|
||||||
|
ERR_clear_error();
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -667,8 +667,10 @@ ossl_pkcs7_verify(int argc, VALUE *argv, VALUE self)
|
||||||
}
|
}
|
||||||
ok = PKCS7_verify(p7, x509s, x509st, in, out, flg);
|
ok = PKCS7_verify(p7, x509s, x509st, in, out, flg);
|
||||||
BIO_free(in);
|
BIO_free(in);
|
||||||
|
if (ok < 0) ossl_raise(ePKCS7Error, NULL);
|
||||||
msg = ERR_reason_error_string(ERR_get_error());
|
msg = ERR_reason_error_string(ERR_get_error());
|
||||||
ossl_pkcs7_set_err_string(self, msg ? rb_str_new2(msg) : Qnil);
|
ossl_pkcs7_set_err_string(self, msg ? rb_str_new2(msg) : Qnil);
|
||||||
|
ERR_clear_error();
|
||||||
data = ossl_membio2str(out);
|
data = ossl_membio2str(out);
|
||||||
ossl_pkcs7_set_data(self, data);
|
ossl_pkcs7_set_data(self, data);
|
||||||
sk_X509_pop_free(x509s, X509_free);
|
sk_X509_pop_free(x509s, X509_free);
|
||||||
|
|
Loading…
Add table
Reference in a new issue