summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/openssl/test_x509cert.rb11
-rw-r--r--test/openssl/test_x509crl.rb11
-rw-r--r--test/openssl/test_x509name.rb9
-rw-r--r--test/openssl/test_x509req.rb11
4 files changed, 35 insertions, 7 deletions
diff --git a/test/openssl/test_x509cert.rb b/test/openssl/test_x509cert.rb
index 66dd84c2456..a5a75ff1b6f 100644
--- a/test/openssl/test_x509cert.rb
+++ b/test/openssl/test_x509cert.rb
@@ -1,6 +1,11 @@
-require "openssl"
+begin
+ require "openssl"
+ require File.join(File.dirname(__FILE__), "utils.rb")
+rescue LoadError
+end
require "test/unit"
-require File.join(File.dirname(__FILE__), "utils.rb")
+
+if defined?(OpenSSL)
class OpenSSL::TestX509Certificate < Test::Unit::TestCase
def setup
@@ -166,3 +171,5 @@ class OpenSSL::TestX509Certificate < Test::Unit::TestCase
}
end
end
+
+end
diff --git a/test/openssl/test_x509crl.rb b/test/openssl/test_x509crl.rb
index 201a79e503b..64d895f0f58 100644
--- a/test/openssl/test_x509crl.rb
+++ b/test/openssl/test_x509crl.rb
@@ -1,6 +1,11 @@
-require "openssl"
+begin
+ require "openssl"
+ require File.join(File.dirname(__FILE__), "utils.rb")
+rescue LoadError
+end
require "test/unit"
-require File.join(File.dirname(__FILE__), "utils.rb")
+
+if defined?(OpenSSL)
class OpenSSL::TestX509CRL < Test::Unit::TestCase
def setup
@@ -207,3 +212,5 @@ class OpenSSL::TestX509CRL < Test::Unit::TestCase
assert_equal(false, crl.verify(@dsa512))
end
end
+
+end
diff --git a/test/openssl/test_x509name.rb b/test/openssl/test_x509name.rb
index 85cc5ca2f96..0fbe2c2569d 100644
--- a/test/openssl/test_x509name.rb
+++ b/test/openssl/test_x509name.rb
@@ -1,6 +1,11 @@
-require "openssl"
+begin
+ require "openssl"
+rescue LoadError
+end
require "test/unit"
+if defined?(OpenSSL)
+
class OpenSSL::TestX509Name < Test::Unit::TestCase
def setup
@obj_type_tmpl = Hash.new(OpenSSL::ASN1::PRINTABLESTRING)
@@ -153,3 +158,5 @@ class OpenSSL::TestX509Name < Test::Unit::TestCase
assert_equal(OpenSSL::ASN1::PRINTABLESTRING, ary[4][2])
end
end
+
+end
diff --git a/test/openssl/test_x509req.rb b/test/openssl/test_x509req.rb
index 6f0f8bac6d3..a37ed5c5efb 100644
--- a/test/openssl/test_x509req.rb
+++ b/test/openssl/test_x509req.rb
@@ -1,6 +1,11 @@
-require "openssl"
+begin
+ require "openssl"
+ require File.join(File.dirname(__FILE__), "utils.rb")
+rescue LoadError
+end
require "test/unit"
-require File.join(File.dirname(__FILE__), "utils.rb")
+
+if defined?(OpenSSL)
class OpenSSL::TestX509Request < Test::Unit::TestCase
def setup
@@ -131,3 +136,5 @@ class OpenSSL::TestX509Request < Test::Unit::TestCase
issue_csr(0, @dn, @dsa512, OpenSSL::Digest::MD5.new) }
end
end
+
+end