Class: OpenSSL::X509::Name

Inherits:
Object
  • Object
show all
Defined in:
lib/openssl/x509.rb,
lib/openssl/dummy.rb

Defined Under Namespace

Modules: RFC2253DN

Class Method Summary collapse

Class Method Details

.parse_openssl(str, template = OBJECT_TYPE_TEMPLATE) ⇒ Object Also known as: parse



145
146
147
148
# File 'lib/openssl/x509.rb', line 145

def parse_openssl(str, template=OBJECT_TYPE_TEMPLATE)
  ary = str.scan(/\s*([^\/,]+)\s*/).collect{|i| i[0].split("=", 2) }
  self.new(ary, template)
end

.parse_rfc2253(str, template = OBJECT_TYPE_TEMPLATE) ⇒ Object



140
141
142
143
# File 'lib/openssl/x509.rb', line 140

def parse_rfc2253(str, template=OBJECT_TYPE_TEMPLATE)
  ary = OpenSSL::X509::Name::RFC2253DN.scan(str)
  self.new(ary, template)
end