diff options
Diffstat (limited to 'ext/openssl/lib')
-rw-r--r-- | ext/openssl/lib/openssl/x509.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/openssl/lib/openssl/x509.rb b/ext/openssl/lib/openssl/x509.rb index f7df597acb..8efe3701c8 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 |