Skip to content
instance method

OpenSSL::X509::Name#to_s

(?::OpenSSL::X509::Name::format format) -> ::String
name.to_s → string
name.to_s(format) → string

Returns a String representation of the Distinguished Name. format is one of:

If format is omitted, the largely broken and traditional OpenSSL format (X509_NAME_oneline() format) is chosen.

Use of this method is discouraged. None of the formats other than OpenSSL::X509::Name::RFC2253 is standardized and may show an inconsistent behavior through OpenSSL versions.

It is recommended to use to_utf8 instead, which is equivalent to calling name.to_s(OpenSSL::X509::Name::RFC2253).force_encoding("UTF-8").

See also #to_der #to_utf8 #to_a also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0