summaryrefslogtreecommitdiff
path: root/ext/openssl/lib
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-05 09:08:40 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-05 09:08:40 +0000
commitd9f38cbee88fdbb06d8577496062918da39fdeab (patch)
tree32333543a60cb2accc56c0b4377114324e1166b6 /ext/openssl/lib
parent8d4d2e43233afcb075b4663828568bd5a5f16712 (diff)
* ext/openssl/lib/openssl/x509.rb: new method X509::Name::parse.
* ext/openssl/ossl_digest.c: add ossl_digest_new(). * ext/openssl/ossl_digest.h: ditto. * ext/openssl/ossl_cipher.c: add ossl_cipher_new(). * ext/openssl/ossl_cipher.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/lib')
-rw-r--r--ext/openssl/lib/openssl/x509.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/openssl/lib/openssl/x509.rb b/ext/openssl/lib/openssl/x509.rb
index f7df597..8efe370 100644
--- a/ext/openssl/lib/openssl/x509.rb
+++ b/ext/openssl/lib/openssl/x509.rb
@@ -88,7 +88,7 @@ module OpenSSL
end # Extension
class Attribute
- def Attribute::new(arg)
+ def self.new(arg)
type = arg.class
while type
method = "new_from_#{type.name.downcase}".intern
@@ -128,5 +128,12 @@ module OpenSSL
end
end # Attribute
+ class Name
+ def self.parse(str)
+ ary = str.scan(/\s*([^\/,]+)\s*/).collect{|i| i[0].split("=") }
+ self.new(ary)
+ end
+ end # Name
+
end # X509
end # OpenSSL