mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
8d4d2e4323
commit
d9f38cbee8
6 changed files with 56 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue