mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/openssl/ossl_pkey.c: added PKey.read module function that allow
reading arbitrary public/private keys from DER-/PEM-encoded File or string instances. * ext/openssl/ossl_pkey_dh.c: improved documentation. * test/openssl/utils.rb: added EC test key. * test/openssl/test_pkey_rsa.rb test/openssl/test_pkey_dsa.rb: Test PKey.read. Reuse keys from OpenSSL::TestUtils. * test/openssl/test_pkey_ec.rb: Created test file for EC tests. Test PKey.read. [Ruby 1.9 - Feature #4424] [ruby-core:35330] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7b614a53dd
commit
bbb3cfb12b
7 changed files with 251 additions and 15 deletions
|
@ -80,6 +80,14 @@ Q1VB8qkJN7rA7/2HrCR3gTsWNb1YhAsnFsoeRscC+LxXoXi9OAIUBG98h4tilg6S
|
|||
-----END DSA PRIVATE KEY-----
|
||||
_end_of_pem_
|
||||
|
||||
TEST_KEY_EC_P256V1 = OpenSSL::PKey::EC.new <<-_end_of_pem_
|
||||
-----BEGIN EC PRIVATE KEY-----
|
||||
MHcCAQEEIID49FDqcf1O1eO8saTgG70UbXQw9Fqwseliit2aWhH1oAoGCCqGSM49
|
||||
AwEHoUQDQgAEFglk2c+oVUIKQ64eZG9bhLNPWB7lSZ/ArK41eGy5wAzU/0G51Xtt
|
||||
CeBUl+MahZtn9fO1JKdF4qJmS39dXnpENg==
|
||||
-----END EC PRIVATE KEY-----
|
||||
_end_of_pem_
|
||||
|
||||
module_function
|
||||
|
||||
def issue_cert(dn, key, serial, not_before, not_after, extensions,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue