diff options
Diffstat (limited to 'vendor/certificate_authority')
-rw-r--r-- | vendor/certificate_authority/lib/certificate_authority/certificate.rb | 6 | ||||
-rw-r--r-- | vendor/certificate_authority/lib/certificate_authority/extensions.rb | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/vendor/certificate_authority/lib/certificate_authority/certificate.rb b/vendor/certificate_authority/lib/certificate_authority/certificate.rb index f096c5a..3fcae90 100644 --- a/vendor/certificate_authority/lib/certificate_authority/certificate.rb +++ b/vendor/certificate_authority/lib/certificate_authority/certificate.rb @@ -1,5 +1,3 @@ -require 'active_support/all' - module CertificateAuthority class Certificate include ActiveModel::Validations @@ -34,8 +32,8 @@ module CertificateAuthority self.distinguished_name = DistinguishedName.new self.serial_number = SerialNumber.new self.key_material = MemoryKeyMaterial.new - self.not_before = Time.now.change(:min => 0).utc - self.not_after = Time.now.change(:min => 0).utc + 1.year + self.not_before = Time.now + self.not_after = Time.now + 60 * 60 * 24 * 365 # One year self.parent = self self.extensions = load_extensions() diff --git a/vendor/certificate_authority/lib/certificate_authority/extensions.rb b/vendor/certificate_authority/lib/certificate_authority/extensions.rb index 89de032..7bc4fab 100644 --- a/vendor/certificate_authority/lib/certificate_authority/extensions.rb +++ b/vendor/certificate_authority/lib/certificate_authority/extensions.rb @@ -282,11 +282,11 @@ module CertificateAuthority return obj if value.nil? obj.critical = critical value.split("\n").each do |v| - if v.starts_with?("OCSP") + if v =~ /^OCSP/ obj.ocsp << v.split.last end - if v.starts_with?("CA Issuers") + if v =~ /^CA Issuers/ obj.ca_issuers << v.split.last end end |