diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2021-11-11 17:59:22 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2021-12-25 02:52:03 +0900 |
commit | 21d611f3f44b031496e01601e74da28c8bbb14fe (patch) | |
tree | 527de94d4d1a5b9abfca2e475b14d7aca696b513 /test | |
parent | 8be6b85954a2962563aced0468629feac96dd4cb (diff) | |
download | ruby-openssl-21d611f3f44b031496e01601e74da28c8bbb14fe.tar.gz |
test/openssl/test_ssl: adjust certificate expiry date
test_connect_certificate_verify_failed_exception_message occasionally
fails. Is it possible that OpenSSL sees a different clock from Ruby by
more than 10 seconds?
http://ci.rvm.jp/logfiles/brlog.trunk-random0.20211111-072828
Let's give more time after the certificate expiration date to see if
this fixes the flakiness. We had similar occasional failures in
test_x509store.rb before, which disappeared after ruby/ruby commit
7930a352a57c and ruby/openssl commit fb2fcbb13734.
(cherry picked from commit ruby/ruby@cd51bf61a2178a73219f7884792dfb82ca64c082)
Diffstat (limited to 'test')
-rw-r--r-- | test/openssl/test_ssl.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb index 2abade06..a7607da0 100644 --- a/test/openssl/test_ssl.rb +++ b/test/openssl/test_ssl.rb @@ -1000,8 +1000,9 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase } ctx_proc = proc { |ctx| + now = Time.now ctx.cert = issue_cert(@svr, @svr_key, 30, [], @ca_cert, @ca_key, - not_before: Time.now-100, not_after: Time.now-10) + not_before: now - 7200, not_after: now - 3600) } start_server(ignore_listener_error: true, ctx_proc: ctx_proc) { |port| store = OpenSSL::X509::Store.new |