summaryrefslogtreecommitdiffstats
path: root/ext/openssl/lib
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-09 16:20:22 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-09 16:20:22 +0000
commit9de6d1dd87cd31889b4f9e721f6245dbd1e63af7 (patch)
tree8dbfe93b8b90f5cb9cf60050ba91ea3351359bfa /ext/openssl/lib
parentc222de6d9908ce0004ea7b43d49f85938797e6da (diff)
downloadruby-9de6d1dd87cd31889b4f9e721f6245dbd1e63af7.tar.gz
ruby-9de6d1dd87cd31889b4f9e721f6245dbd1e63af7.tar.xz
ruby-9de6d1dd87cd31889b4f9e721f6245dbd1e63af7.zip
* ext/openssl/ossl_x509name.c (ossl_x509name_initialize): add
optional argument to specify the DirectoryString type (ASN1::UTF8STRING by default). RFC3280 deprecates PrintableString for DirectoryString, and strongly requires to use UTF8String for all certificates issued after December, 31 2003. * ext/openssl/lib/openssl/x509.rb (X509::Name::parse): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/lib')
-rw-r--r--ext/openssl/lib/openssl/x509.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/lib/openssl/x509.rb b/ext/openssl/lib/openssl/x509.rb
index b8cc5bd4e..40b1a6dd1 100644
--- a/ext/openssl/lib/openssl/x509.rb
+++ b/ext/openssl/lib/openssl/x509.rb
@@ -64,9 +64,9 @@ module OpenSSL
end # Extension
class Name
- def self.parse(str)
+ def self.parse(str, type=ASN1::UTF8STRING)
ary = str.scan(/\s*([^\/,]+)\s*/).collect{|i| i[0].split("=") }
- self.new(ary)
+ self.new(ary, type)
end
end # Name