Needs time.rb for Time#iso8601

`Gem::Request.verify_certificate_message` used this method without
"time" which defines it.
This commit is contained in:
Nobuyoshi Nakada 2021-10-10 20:28:14 +09:00
parent b56bb0cf9b
commit b16d876ac2
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

View File

@ -96,8 +96,10 @@ class Gem::Request
return unless cert
case error_number
when OpenSSL::X509::V_ERR_CERT_HAS_EXPIRED then
require 'time'
"Certificate #{cert.subject} expired at #{cert.not_after.iso8601}"
when OpenSSL::X509::V_ERR_CERT_NOT_YET_VALID then
require 'time'
"Certificate #{cert.subject} not valid until #{cert.not_before.iso8601}"
when OpenSSL::X509::V_ERR_CERT_REJECTED then
"Certificate #{cert.subject} is rejected"