aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGOTOU Yuuzou <gotoyuzo@notwork.org>2003-07-21 17:54:03 +0000
committerGOTOU Yuuzou <gotoyuzo@notwork.org>2003-07-21 17:54:03 +0000
commitc7f1f4441ca27c111fb55a07f40f8c3f8dc217d4 (patch)
tree957558887e5791d0dbbd504712efb3d3a520e40f
parent4f0524a1699662bb1f7208ab822075a0a859a5ac (diff)
downloadruby-openssl-history-c7f1f4441ca27c111fb55a07f40f8c3f8dc217d4.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog5
-rwxr-xr-xexamples/gen.sh1
-rwxr-xr-xexamples/ossl_x509store.rb4
-rw-r--r--ossl_x509store.c2
4 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1f186d7..0da9de3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue, 22 Jul 2003 02:56:54 +0900 -- GOTOU Yuuzou <gotoyuzo@notwork.org>
+ * examples/gen.sh: print OPENSSL_VERSION
+ * exapmles/ossl_x509store.rb: unuse Store#set_flags is <= 0x00907000
+ * ossl_x509store.c: fix version spec.
+
Mon, 21 Jul 2003 23:14:27 +0900 -- GOTOU Yuuzou <gotoyuzo@notwork.org>
* examples/ossl_ocsp.rb: typo fixed.
diff --git a/examples/gen.sh b/examples/gen.sh
index 9e0a5e0..b385aa1 100755
--- a/examples/gen.sh
+++ b/examples/gen.sh
@@ -2,6 +2,7 @@
rm -f *.pem
+ruby -r openssl -e 'p [ :OPENSSL_VERSION, OpenSSL::OPENSSL_VERSION ]'
echo "===> Issueing CA certificate"
dn="/C=JP/O=Does.Notwork.Org/OU=demoCA/CN=CA"
ruby gen_ca_cert.rb "${dn}"
diff --git a/examples/ossl_x509store.rb b/examples/ossl_x509store.rb
index 4f51807..eed5e80 100755
--- a/examples/ossl_x509store.rb
+++ b/examples/ossl_x509store.rb
@@ -104,5 +104,7 @@ puts "========== Add CRL to the Store and Verify Certs =========="
store.add_crl(crl)
#store.add_path("./crl")
#store.add_file("./0crl.pem")
-store.flags = X509::V_FLAG_CRL_CHECK|X509::V_FLAG_CRL_CHECK_ALL
+if OPENSSL_VERSION_NUMBER >= 0x00907000
+ store.flags = X509::V_FLAG_CRL_CHECK|X509::V_FLAG_CRL_CHECK_ALL
+end
verify_with_store(store, certs, verify_cb)
diff --git a/ossl_x509store.c b/ossl_x509store.c
index 230db50..d001a02 100644
--- a/ossl_x509store.c
+++ b/ossl_x509store.c
@@ -128,7 +128,7 @@ ossl_x509store_initialize(int argc, VALUE *argv, VALUE self)
X509_STORE_set_verify_cb_func(store, ossl_verify_cb);
ossl_x509store_set_vfy_cb(self, Qnil);
-#if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
+#if (OPENSSL_VERSION_NUMBER < 0x00907000L)
rb_iv_set(self, "@flags", INT2NUM(0));
rb_iv_set(self, "@purpose", INT2NUM(0));
rb_iv_set(self, "@trust", INT2NUM(0));