summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-09 11:57:34 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-09 11:57:34 +0000
commit4959105aa358d88e494e4a8bf5adf169f1158b09 (patch)
treef220c705d4a0e3d4dddfc6e16e2bdf3ed2094187
parentb8ace6362a1c5ae39a131063bdb22e0449d0021e (diff)
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_6@22855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/openssl/ossl_ocsp.c8
-rw-r--r--version.h2
3 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index cfc83c3138..cbd26f3895 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Mar 9 20:56:42 2009 Shugo Maeda <shugo@ruby-lang.org>
+
+ * 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.
+
Mon Mar 9 10:01:26 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
* re.c (match_check): check if MatchData is initialized.
diff --git a/ext/openssl/ossl_ocsp.c b/ext/openssl/ossl_ocsp.c
index b5ea9dadf5..cf1c147c78 100644
--- a/ext/openssl/ossl_ocsp.c
+++ b/ext/openssl/ossl_ocsp.c
@@ -589,22 +589,22 @@ ossl_ocspbres_sign(int argc, VALUE *argv, VALUE self)
static VALUE
ossl_ocspbres_verify(int argc, VALUE *argv, VALUE self)
{
- VALUE certs, store, flags;
+ VALUE certs, store, flags, result;
OCSP_BASICRESP *bs;
STACK_OF(X509) *x509s;
X509_STORE *x509st;
- int flg, result;
+ int flg;
rb_scan_args(argc, argv, "21", &certs, &store, &flags);
x509st = GetX509StorePtr(store);
flg = NIL_P(flags) ? 0 : INT2NUM(flags);
x509s = ossl_x509_ary2sk(certs);
GetOCSPBasicRes(self, bs);
- result = OCSP_basic_verify(bs, x509s, x509st, flg);
+ result = OCSP_basic_verify(bs, x509s, x509st, flg) > 0 ? Qtrue : Qfalse;
sk_X509_pop_free(x509s, X509_free);
if(!result) rb_warn("%s", ERR_error_string(ERR_peek_error(), NULL));
- return result ? Qtrue : Qfalse;
+ return result;
}
/*
diff --git a/version.h b/version.h
index 6630581044..74fbd6d7d8 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2009-03-09"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20090309
-#define RUBY_PATCHLEVEL 360
+#define RUBY_PATCHLEVEL 361
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8