summaryrefslogtreecommitdiff
path: root/ext/openssl/lib
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/lib')
-rw-r--r--ext/openssl/lib/openssl/x509.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/openssl/lib/openssl/x509.rb b/ext/openssl/lib/openssl/x509.rb
index f7df597..8efe370 100644
--- a/ext/openssl/lib/openssl/x509.rb
+++ b/ext/openssl/lib/openssl/x509.rb
@@ -88,7 +88,7 @@ module OpenSSL
end # Extension
class Attribute
- def Attribute::new(arg)
+ def self.new(arg)
type = arg.class
while type
method = "new_from_#{type.name.downcase}".intern
@@ -128,5 +128,12 @@ module OpenSSL
end
end # Attribute
+ class Name
+ def self.parse(str)
+ ary = str.scan(/\s*([^\/,]+)\s*/).collect{|i| i[0].split("=") }
+ self.new(ary)
+ end
+ end # Name
+
end # X509
end # OpenSSL