Skip to content

Commit d877613

Browse files
authored
Merge pull request #393 from lomeroe/fix-test_verification_without_httpclient
Set time in test_verification_without_httpclient test during cert validation
2 parents 27fbb07 + 8cd04f0 commit d877613

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/test_ssl.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require File.expand_path('helper', File.dirname(__FILE__))
22
require 'webrick/https'
3+
require 'time'
34

45

56
class TestSSL < Test::Unit::TestCase
@@ -87,6 +88,7 @@ def test_verification_without_httpclient
8788
cert = ::OpenSSL::X509::Certificate.new(raw_cert)
8889
store = ::OpenSSL::X509::Store.new
8990
store.add_cert(ca_cert)
91+
store.time = Time.new(2017, 01, 01)
9092
assert(store.verify(cert))
9193
end
9294

0 commit comments

Comments
 (0)