Skip to content

Commit 46496ac

Browse files
committed
merge revision(s) 22646:
* ext/openssl/ossl_ocsp.c (ossl_ocspbres_verify): OCSP_basic_verify returns positive value on success, not non-zero. [ruby-core:21762] backported r22440 from trunk. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@22857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent c182d50 commit 46496ac

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Mon Mar 9 20:59:24 2009 Shugo Maeda <shugo@ruby-lang.org>
2+
3+
* ext/openssl/ossl_ocsp.c (ossl_ocspbres_verify): OCSP_basic_verify
4+
returns positive value on success, not non-zero. [ruby-core:21762]
5+
backported r22440 from trunk.
6+
17
Mon Mar 9 10:02:15 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
28

39
* re.c (match_check): check if MatchData is initialized.

ext/openssl/ossl_ocsp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -589,22 +589,22 @@ ossl_ocspbres_sign(int argc, VALUE *argv, VALUE self)
589589
static VALUE
590590
ossl_ocspbres_verify(int argc, VALUE *argv, VALUE self)
591591
{
592-
VALUE certs, store, flags;
592+
VALUE certs, store, flags, result;
593593
OCSP_BASICRESP *bs;
594594
STACK_OF(X509) *x509s;
595595
X509_STORE *x509st;
596-
int flg, result;
596+
int flg;
597597

598598
rb_scan_args(argc, argv, "21", &certs, &store, &flags);
599599
x509st = GetX509StorePtr(store);
600600
flg = NIL_P(flags) ? 0 : INT2NUM(flags);
601601
x509s = ossl_x509_ary2sk(certs);
602602
GetOCSPBasicRes(self, bs);
603-
result = OCSP_basic_verify(bs, x509s, x509st, flg);
603+
result = OCSP_basic_verify(bs, x509s, x509st, flg) > 0 ? Qtrue : Qfalse;
604604
sk_X509_pop_free(x509s, X509_free);
605605
if(!result) rb_warn("%s", ERR_error_string(ERR_peek_error(), NULL));
606606

607-
return result ? Qtrue : Qfalse;
607+
return result;
608608
}
609609

610610
/*

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define RUBY_RELEASE_DATE "2009-03-09"
33
#define RUBY_VERSION_CODE 187
44
#define RUBY_RELEASE_CODE 20090309
5-
#define RUBY_PATCHLEVEL 149
5+
#define RUBY_PATCHLEVEL 150
66

77
#define RUBY_VERSION_MAJOR 1
88
#define RUBY_VERSION_MINOR 8

0 commit comments

Comments
 (0)