diff options
| author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-09-05 09:08:40 +0000 |
|---|---|---|
| committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-09-05 09:08:40 +0000 |
| commit | 02b0891d4e3c26c9a64e647e3becf125c517bc7a (patch) | |
| tree | 32333543a60cb2accc56c0b4377114324e1166b6 /ext/openssl/lib | |
| parent | 3efc6bfe4d1af9d124b330aa44f271d03ea29a16 (diff) | |
| download | ruby-02b0891d4e3c26c9a64e647e3becf125c517bc7a.tar.gz ruby-02b0891d4e3c26c9a64e647e3becf125c517bc7a.tar.xz ruby-02b0891d4e3c26c9a64e647e3becf125c517bc7a.zip | |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@4511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/lib')
| -rw-r--r-- | ext/openssl/lib/openssl/x509.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/openssl/lib/openssl/x509.rb b/ext/openssl/lib/openssl/x509.rb index f7df597ac..8efe3701c 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 |
