diff options
author | elijah <elijah@riseup.net> | 2014-10-28 11:23:55 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-10-28 11:23:55 -0700 |
commit | 6d443e008a94f842799f30d15aacb754439fe101 (patch) | |
tree | 8b5a3dfb75a2144d0f1b8fabc961fe72ae4bd330 /vendor/certificate_authority | |
parent | dddbaa40ed9abb1031ccdce21c3d6769dbc5b112 (diff) | |
download | leap_cli-6d443e008a94f842799f30d15aacb754439fe101.tar.gz leap_cli-6d443e008a94f842799f30d15aacb754439fe101.tar.bz2 |
better solution to activesupport dependency problem
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 |