summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-03-22 03:51:24 +0900
committerKazuki Yamaguchi <k@rhe.jp>2021-03-16 19:16:10 +0900
commit10d360847baf3394b7d9cd0dca6fa6908a2ce604 (patch)
treee002efb69ac76d6d34d47ff7d76f7c7d65c67339 /ext
parentefad0166c660d565d5e80e862cd9ff9457f8ed03 (diff)
[ruby/openssl] pkey: prefer PKey.read over PKey::RSA.new in docs
https://github.com/ruby/openssl/commit/cf92a3ffba
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4275
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/ossl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index ce02efd983..b9e5ba2a98 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -682,13 +682,13 @@ ossl_crypto_fixed_length_secure_compare(VALUE dummy, VALUE str1, VALUE str2)
*
* A key can also be loaded from a file.
*
- * key2 = OpenSSL::PKey::RSA.new File.read 'private_key.pem'
+ * key2 = OpenSSL::PKey.read File.read 'private_key.pem'
* key2.public? # => true
* key2.private? # => true
*
* or
*
- * key3 = OpenSSL::PKey::RSA.new File.read 'public_key.pem'
+ * key3 = OpenSSL::PKey.read File.read 'public_key.pem'
* key3.public? # => true
* key3.private? # => false
*
@@ -700,7 +700,7 @@ ossl_crypto_fixed_length_secure_compare(VALUE dummy, VALUE str1, VALUE str2)
*
* key4_pem = File.read 'private.secure.pem'
* pass_phrase = 'my secure pass phrase goes here'
- * key4 = OpenSSL::PKey::RSA.new key4_pem, pass_phrase
+ * key4 = OpenSSL::PKey.read key4_pem, pass_phrase
*
* == RSA Encryption
*