Sha256: ea6c7aaed878224e2ecc8c1d67e4efceeb55d72a21a1b8c47de3f34a0ba9fcac
Contents?: true
Size: 530 Bytes
Versions: 1
Compression:
Stored size: 530 Bytes
Contents
module R509::CertificateAuthority::Http class ValidityPeriodConverter def convert(validity_period) if validity_period.nil? raise ArgumentError, "Must provide validity period" end if validity_period.to_i <= 0 raise ArgumentError, "Validity period must be positive" end { :not_before => Time.now - 6 * 60 * 60, :not_after => Time.now + validity_period.to_i, } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
r509-ca-http-0.1 | lib/r509/certificateauthority/http/validityperiodconverter.rb |