mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
![]() * ext/openssl/ossl.c (ossl_pem_passwd_value): Added. Convert the argument to String with StringValue() and validate the length is in 4..PEM_BUFSIZE. PEM_BUFSIZE is a macro defined in OpenSSL headers. (ossl_pem_passwd_cb): When reading/writing encrypted PEM format, we used to pass the password to PEM_def_callback() directly but it was problematic. It is not NUL character safe. And surprisingly, it silently truncates the password to 1024 bytes. [GH ruby/openssl#51] * ext/openssl/ossl.h: Add function prototype declaration of newly added ossl_pem_passwd_value(). * ext/openssl/ossl_pkey.c (ossl_pkey_new_from_data): Use ossl_pem_passwd_value() to validate the password String. * ext/openssl/ossl_pkey_dsa.c (ossl_dsa_initialize, ossl_dsa_export): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_initialize, ossl_ec_key_to_string): ditto. * ext/openssl/ossl_pkey_rsa.c (ossl_rsa_initialize, ossl_rsa_export): ditto. * test/openssl/test_pkey_{dsa,ec,rsa}.rb: test this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
||
---|---|---|
.. | ||
test_asn1.rb | ||
test_bn.rb | ||
test_buffering.rb | ||
test_cipher.rb | ||
test_config.rb | ||
test_digest.rb | ||
test_engine.rb | ||
test_fips.rb | ||
test_hmac.rb | ||
test_ns_spki.rb | ||
test_ocsp.rb | ||
test_pair.rb | ||
test_partial_record_read.rb | ||
test_pkcs5.rb | ||
test_pkcs7.rb | ||
test_pkcs12.rb | ||
test_pkey_dh.rb | ||
test_pkey_dsa.rb | ||
test_pkey_ec.rb | ||
test_pkey_rsa.rb | ||
test_random.rb | ||
test_ssl.rb | ||
test_ssl_session.rb | ||
test_x509attr.rb | ||
test_x509cert.rb | ||
test_x509crl.rb | ||
test_x509ext.rb | ||
test_x509name.rb | ||
test_x509req.rb | ||
test_x509store.rb | ||
utils.rb |