Class: OpenSSL::X509::Name

Inherits:
Object show all
Defined in:
lib/puppet/util/monkey_patches.rb

Instance Method Summary collapse

Instance Method Details

#to_utf8Object


93
94
95
96
97
# File 'lib/puppet/util/monkey_patches.rb', line 93

def to_utf8
  # https://github.com/ruby/ruby/blob/v2_5_5/ext/openssl/ossl_x509name.c#L317
  str = to_s(OpenSSL::X509::Name::RFC2253)
  str.force_encoding(Encoding::UTF_8)
end