summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-10-28 11:23:55 -0700
committerelijah <elijah@riseup.net>2014-10-28 11:23:55 -0700
commit6d443e008a94f842799f30d15aacb754439fe101 (patch)
tree8b5a3dfb75a2144d0f1b8fabc961fe72ae4bd330 /vendor
parentdddbaa40ed9abb1031ccdce21c3d6769dbc5b112 (diff)
better solution to activesupport dependency problem
Diffstat (limited to 'vendor')
-rw-r--r--vendor/certificate_authority/lib/certificate_authority/certificate.rb6
-rw-r--r--vendor/certificate_authority/lib/certificate_authority/extensions.rb4
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