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



107
108
109
110
111
# File 'lib/puppet/util/monkey_patches.rb', line 107

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