Class: OpenSSL::X509::Name

Inherits:
Object show all
Defined in:
lib/extensions/openssl/openssl/x509-internal.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



144
145
146
147
# File 'lib/extensions/openssl/openssl/x509-internal.rb', line 144

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



139
140
141
142
# File 'lib/extensions/openssl/openssl/x509-internal.rb', line 139

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