summaryrefslogtreecommitdiff
path: root/test/openssl
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-13 03:05:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-13 03:05:43 +0000
commitaf06381332c9344fc3c400cf7365bd6cc4a9cc00 (patch)
treed6b935203812b5fcbc51a635be13bcc520d6011c /test/openssl
parent88cea9f7e2e7c9e2968dcc3d9b4df069e76df76a (diff)
test/openssl: skip old OpenSSL
* test/openssl/utils.rb (OpenSSL::TestUtils): ignore out-of-date OpenSSL before 1.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl')
-rw-r--r--test/openssl/test_asn1.rb2
-rw-r--r--test/openssl/test_bn.rb2
-rw-r--r--test/openssl/test_buffering.rb2
-rw-r--r--test/openssl/test_cipher.rb2
-rw-r--r--test/openssl/test_config.rb2
-rw-r--r--test/openssl/test_digest.rb2
-rw-r--r--test/openssl/test_engine.rb2
-rw-r--r--test/openssl/test_fips.rb2
-rw-r--r--test/openssl/test_hmac.rb2
-rw-r--r--test/openssl/test_ns_spki.rb2
-rw-r--r--test/openssl/test_ocsp.rb2
-rw-r--r--test/openssl/test_pair.rb2
-rw-r--r--test/openssl/test_partial_record_read.rb2
-rw-r--r--test/openssl/test_pkcs12.rb2
-rw-r--r--test/openssl/test_pkcs5.rb2
-rw-r--r--test/openssl/test_pkcs7.rb2
-rw-r--r--test/openssl/test_pkey_dh.rb2
-rw-r--r--test/openssl/test_pkey_dsa.rb2
-rw-r--r--test/openssl/test_pkey_rsa.rb2
-rw-r--r--test/openssl/test_ssl.rb2
-rw-r--r--test/openssl/test_ssl_session.rb2
-rw-r--r--test/openssl/test_x509cert.rb2
-rw-r--r--test/openssl/test_x509crl.rb2
-rw-r--r--test/openssl/test_x509ext.rb2
-rw-r--r--test/openssl/test_x509name.rb2
-rw-r--r--test/openssl/test_x509req.rb2
-rw-r--r--test/openssl/test_x509store.rb2
-rw-r--r--test/openssl/utils.rb3
28 files changed, 29 insertions, 28 deletions
diff --git a/test/openssl/test_asn1.rb b/test/openssl/test_asn1.rb
index 3ea2638b0b..9fb5a551c6 100644
--- a/test/openssl/test_asn1.rb
+++ b/test/openssl/test_asn1.rb
@@ -605,5 +605,5 @@ rEzBQ0F9dUyqQ9gyRg8KHhDfv9HzT1d/rnUZMkoombwYBRIUChGCYV0GnJcan2Zm
assert_equal(:UNIVERSAL, asn1.tag_class)
end
-end if defined?(OpenSSL)
+end if defined?(OpenSSL::TestUtils)
diff --git a/test/openssl/test_bn.rb b/test/openssl/test_bn.rb
index 27bbcdfeaf..667cb2964e 100644
--- a/test/openssl/test_bn.rb
+++ b/test/openssl/test_bn.rb
@@ -1,6 +1,6 @@
require_relative 'utils'
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestBN < Test::Unit::TestCase
def test_new_str
diff --git a/test/openssl/test_buffering.rb b/test/openssl/test_buffering.rb
index c4894e1291..c62dd4d1dd 100644
--- a/test/openssl/test_buffering.rb
+++ b/test/openssl/test_buffering.rb
@@ -84,4 +84,4 @@ class OpenSSL::TestBuffering < Test::Unit::TestCase
assert_equal([97, 98, 99], res)
end
-end if defined?(OpenSSL)
+end if defined?(OpenSSL::TestUtils)
diff --git a/test/openssl/test_cipher.rb b/test/openssl/test_cipher.rb
index 156fa2a9c9..30220d169c 100644
--- a/test/openssl/test_cipher.rb
+++ b/test/openssl/test_cipher.rb
@@ -1,6 +1,6 @@
require_relative 'utils'
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestCipher < Test::Unit::TestCase
diff --git a/test/openssl/test_config.rb b/test/openssl/test_config.rb
index 4ad90c43f5..62f9fabce2 100644
--- a/test/openssl/test_config.rb
+++ b/test/openssl/test_config.rb
@@ -294,4 +294,4 @@ __EOC__
@it['newsection'] = {'a' => 'b'}
assert_not_equal(@it.sections.sort, c.sections.sort)
end
-end if defined?(OpenSSL)
+end if defined?(OpenSSL::TestUtils)
diff --git a/test/openssl/test_digest.rb b/test/openssl/test_digest.rb
index c2a3f70566..a23b2ef0a2 100644
--- a/test/openssl/test_digest.rb
+++ b/test/openssl/test_digest.rb
@@ -1,6 +1,6 @@
require_relative 'utils'
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestDigest < Test::Unit::TestCase
def setup
diff --git a/test/openssl/test_engine.rb b/test/openssl/test_engine.rb
index 46a2948cbf..a7264d0eeb 100644
--- a/test/openssl/test_engine.rb
+++ b/test/openssl/test_engine.rb
@@ -71,5 +71,5 @@ class OpenSSL::TestEngine < Test::Unit::TestCase
cipher.update(data) + cipher.final
end
-end if defined?(OpenSSL)
+end if defined?(OpenSSL::TestUtils)
diff --git a/test/openssl/test_fips.rb b/test/openssl/test_fips.rb
index 882647f7e1..6e4ac6d345 100644
--- a/test/openssl/test_fips.rb
+++ b/test/openssl/test_fips.rb
@@ -1,6 +1,6 @@
require_relative 'utils'
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestFIPS < Test::Unit::TestCase
diff --git a/test/openssl/test_hmac.rb b/test/openssl/test_hmac.rb
index f1e45365d9..f709ebd69b 100644
--- a/test/openssl/test_hmac.rb
+++ b/test/openssl/test_hmac.rb
@@ -38,4 +38,4 @@ class OpenSSL::TestHMAC < Test::Unit::TestCase
result = hmac.update(data).hexdigest
assert_equal "a13984b929a07912e4e21c5720876a8e150d6f67f854437206e7f86547248396", result
end
-end if defined?(OpenSSL)
+end if defined?(OpenSSL::TestUtils)
diff --git a/test/openssl/test_ns_spki.rb b/test/openssl/test_ns_spki.rb
index 7cddefad6d..ab07bfbebb 100644
--- a/test/openssl/test_ns_spki.rb
+++ b/test/openssl/test_ns_spki.rb
@@ -1,6 +1,6 @@
require_relative 'utils'
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestNSSPI < Test::Unit::TestCase
def setup
diff --git a/test/openssl/test_ocsp.rb b/test/openssl/test_ocsp.rb
index b42b57d498..af727d8ecd 100644
--- a/test/openssl/test_ocsp.rb
+++ b/test/openssl/test_ocsp.rb
@@ -1,6 +1,6 @@
require_relative "utils"
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestOCSP < Test::Unit::TestCase
def setup
diff --git a/test/openssl/test_pair.rb b/test/openssl/test_pair.rb
index b9206daea9..3aca5f4833 100644
--- a/test/openssl/test_pair.rb
+++ b/test/openssl/test_pair.rb
@@ -1,6 +1,6 @@
require_relative 'utils'
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
require 'socket'
require_relative '../ruby/ut_eof'
diff --git a/test/openssl/test_partial_record_read.rb b/test/openssl/test_partial_record_read.rb
index 2d23fc4f24..1899a300df 100644
--- a/test/openssl/test_partial_record_read.rb
+++ b/test/openssl/test_partial_record_read.rb
@@ -1,6 +1,6 @@
require_relative "utils"
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestPartialRecordRead < OpenSSL::SSLTestCase
def test_partial_tls_record_read_nonblock
diff --git a/test/openssl/test_pkcs12.rb b/test/openssl/test_pkcs12.rb
index 25ff606384..4e37904169 100644
--- a/test/openssl/test_pkcs12.rb
+++ b/test/openssl/test_pkcs12.rb
@@ -1,6 +1,6 @@
require_relative "utils"
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
module OpenSSL
class TestPKCS12 < Test::Unit::TestCase
diff --git a/test/openssl/test_pkcs5.rb b/test/openssl/test_pkcs5.rb
index 30fa3e5b0a..5e85dde955 100644
--- a/test/openssl/test_pkcs5.rb
+++ b/test/openssl/test_pkcs5.rb
@@ -94,4 +94,4 @@ class OpenSSL::TestPKCS5 < Test::Unit::TestCase
assert_equal(value1, value2)
end if OpenSSL::PKCS5.respond_to?(:pbkdf2_hmac)
-end if defined?(OpenSSL)
+end if defined?(OpenSSL::TestUtils)
diff --git a/test/openssl/test_pkcs7.rb b/test/openssl/test_pkcs7.rb
index a1ff04851a..47bd4f3133 100644
--- a/test/openssl/test_pkcs7.rb
+++ b/test/openssl/test_pkcs7.rb
@@ -1,6 +1,6 @@
require_relative 'utils'
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestPKCS7 < Test::Unit::TestCase
def setup
diff --git a/test/openssl/test_pkey_dh.rb b/test/openssl/test_pkey_dh.rb
index 160a131c06..67dd3e7db3 100644
--- a/test/openssl/test_pkey_dh.rb
+++ b/test/openssl/test_pkey_dh.rb
@@ -1,6 +1,6 @@
require_relative 'utils'
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestPKeyDH < Test::Unit::TestCase
diff --git a/test/openssl/test_pkey_dsa.rb b/test/openssl/test_pkey_dsa.rb
index 555637e7a4..e4ea1b5bd7 100644
--- a/test/openssl/test_pkey_dsa.rb
+++ b/test/openssl/test_pkey_dsa.rb
@@ -1,7 +1,7 @@
require_relative 'utils'
require 'base64'
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestPKeyDSA < Test::Unit::TestCase
def test_private
diff --git a/test/openssl/test_pkey_rsa.rb b/test/openssl/test_pkey_rsa.rb
index df0c6090cb..ea042c2785 100644
--- a/test/openssl/test_pkey_rsa.rb
+++ b/test/openssl/test_pkey_rsa.rb
@@ -1,7 +1,7 @@
require_relative 'utils'
require 'base64'
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestPKeyRSA < Test::Unit::TestCase
def test_padding
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index 139b93d461..3eddb0a8e8 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -1,6 +1,6 @@
require_relative "utils"
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestSSL < OpenSSL::SSLTestCase
diff --git a/test/openssl/test_ssl_session.rb b/test/openssl/test_ssl_session.rb
index 8066ef13fb..d4c2220ba3 100644
--- a/test/openssl/test_ssl_session.rb
+++ b/test/openssl/test_ssl_session.rb
@@ -1,6 +1,6 @@
require_relative "utils"
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestSSLSession < OpenSSL::SSLTestCase
def test_session_equals
diff --git a/test/openssl/test_x509cert.rb b/test/openssl/test_x509cert.rb
index f13d6456f4..783677a432 100644
--- a/test/openssl/test_x509cert.rb
+++ b/test/openssl/test_x509cert.rb
@@ -1,6 +1,6 @@
require_relative "utils"
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestX509Certificate < Test::Unit::TestCase
def setup
diff --git a/test/openssl/test_x509crl.rb b/test/openssl/test_x509crl.rb
index d5024751d2..9dc1b1cd14 100644
--- a/test/openssl/test_x509crl.rb
+++ b/test/openssl/test_x509crl.rb
@@ -1,6 +1,6 @@
require_relative "utils"
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestX509CRL < Test::Unit::TestCase
def setup
diff --git a/test/openssl/test_x509ext.rb b/test/openssl/test_x509ext.rb
index 89b45c728f..29e9f1dc44 100644
--- a/test/openssl/test_x509ext.rb
+++ b/test/openssl/test_x509ext.rb
@@ -1,6 +1,6 @@
require_relative 'utils'
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestX509Extension < Test::Unit::TestCase
def setup
diff --git a/test/openssl/test_x509name.rb b/test/openssl/test_x509name.rb
index de35fc303a..a92af53492 100644
--- a/test/openssl/test_x509name.rb
+++ b/test/openssl/test_x509name.rb
@@ -1,7 +1,7 @@
# coding: US-ASCII
require_relative 'utils'
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestX509Name < Test::Unit::TestCase
OpenSSL::ASN1::ObjectId.register(
diff --git a/test/openssl/test_x509req.rb b/test/openssl/test_x509req.rb
index d0b6a5725d..27040cb7bf 100644
--- a/test/openssl/test_x509req.rb
+++ b/test/openssl/test_x509req.rb
@@ -1,6 +1,6 @@
require_relative "utils"
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestX509Request < Test::Unit::TestCase
def setup
diff --git a/test/openssl/test_x509store.rb b/test/openssl/test_x509store.rb
index 439c9de26e..f3e144fc51 100644
--- a/test/openssl/test_x509store.rb
+++ b/test/openssl/test_x509store.rb
@@ -1,6 +1,6 @@
require_relative "utils"
-if defined?(OpenSSL)
+if defined?(OpenSSL::TestUtils)
class OpenSSL::TestX509Store < Test::Unit::TestCase
def setup
diff --git a/test/openssl/utils.rb b/test/openssl/utils.rb
index 84cd48dbc1..1da3bcf979 100644
--- a/test/openssl/utils.rb
+++ b/test/openssl/utils.rb
@@ -327,4 +327,5 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC
end
end
-end if defined?(OpenSSL)
+end if defined?(OpenSSL::OPENSSL_LIBRARY_VERSION) and
+ /\AOpenSSL +0\./ !~ OpenSSL::OPENSSL_LIBRARY_VERSION