Class: OpenSSL::X509::Name
- Inherits:
-
Object
- Object
- OpenSSL::X509::Name
- Includes:
- Marshal
- Defined in:
- lib/openssl/x509.rb
Defined Under Namespace
Modules: RFC2253DN
Class Method Summary collapse
- .parse_openssl(str, template = OBJECT_TYPE_TEMPLATE) ⇒ Object (also: parse)
- .parse_rfc2253(str, template = OBJECT_TYPE_TEMPLATE) ⇒ Object
Instance Method Summary collapse
Methods included from Marshal
Class Method Details
.parse_openssl(str, template = OBJECT_TYPE_TEMPLATE) ⇒ Object Also known as: parse
287 288 289 290 291 292 293 294 295 296 |
# File 'lib/openssl/x509.rb', line 287 def parse_openssl(str, template=OBJECT_TYPE_TEMPLATE) if str.start_with?("/") # /A=B/C=D format ary = str[1..-1].split("/").map { |i| i.split("=", 2) } else # Comma-separated ary = str.split(",").map { |i| i.strip.split("=", 2) } end self.new(ary, template) end |