Sha256: b9a84863d161a0e628ea5ca9f0ca7847da145df36a10ebd1988217c742a4869d
Contents?: true
Size: 450 Bytes
Versions: 5
Compression:
Stored size: 450 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
5 entries across 5 versions & 1 rubygems