1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/openssl/ossl_ocsp.c (ossl_ocspreq_verify): flags is VALUE,

so it should use NUM2INT.

* ext/openssl/ossl_ocsp.c (ossl_ocspbres_verify): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2011-03-24 01:25:17 +00:00
parent 72f79b9da4
commit fea562417f
2 changed files with 9 additions and 2 deletions

View file

@ -245,7 +245,7 @@ ossl_ocspreq_verify(int argc, VALUE *argv, VALUE self)
rb_scan_args(argc, argv, "21", &certs, &store, &flags);
x509st = GetX509StorePtr(store);
flg = NIL_P(flags) ? 0 : INT2NUM(flags);
flg = NIL_P(flags) ? 0 : NUM2INT(flags);
x509s = ossl_x509_ary2sk(certs);
GetOCSPReq(self, req);
result = OCSP_request_verify(req, x509s, x509st, flg);
@ -601,7 +601,7 @@ ossl_ocspbres_verify(int argc, VALUE *argv, VALUE self)
rb_scan_args(argc, argv, "21", &certs, &store, &flags);
x509st = GetX509StorePtr(store);
flg = NIL_P(flags) ? 0 : INT2NUM(flags);
flg = NIL_P(flags) ? 0 : NUM2INT(flags);
x509s = ossl_x509_ary2sk(certs);
GetOCSPBasicRes(self, bs);
result = OCSP_basic_verify(bs, x509s, x509st, flg) > 0 ? Qtrue : Qfalse;