Skip to content

Commit 86e3915

Browse files
committed
restore ENV changes in X.509 store test
1 parent 60b9adc commit 86e3915

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/test/ruby/x509/test_x509store.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@ def setup
1111
@pem = File.expand_path('../EntrustnetSecureServerCertificationAuthority.pem', __FILE__)
1212
end
1313

14+
@@ssl_cert_file = ENV['SSL_CERT_FILE']
15+
16+
def teardown
17+
ENV['SSL_CERT_FILE'] = @@ssl_cert_file
18+
end
19+
1420
def test_store_location_with_pem
1521
ENV['SSL_CERT_FILE'] = nil
1622
store = OpenSSL::X509::Store.new
1723
store.set_default_paths
1824
assert !store.verify(@cert)
19-
25+
2026
ENV['SSL_CERT_FILE'] = @ca_cert
2127
store = OpenSSL::X509::Store.new
2228
assert !store.verify(@cert)
@@ -64,7 +70,7 @@ def test_use_non_existing_cert_file
6470

6571
def test_verfy_with_wrong_argument
6672
store = OpenSSL::X509::Store.new
67-
assert_raise(TypeError) { store.verify( 'not an cert object' ) }
73+
assert_raise(TypeError) { store.verify( 'not a cert object' ) }
6874
end
6975

7076
def test_add_cert_concurrently

0 commit comments

Comments
 (0)