aboutsummaryrefslogtreecommitdiffstats
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>2020-05-13 16:14:06 +0900
commitcf92a3ffba6e5e588540e88c0be7db60cf774572 (patch)
tree43f6c49274a2f365bc4c8f28c59b7b20a009b92a /ext
parent867e5c021b7308fe35612510c619b2bba424c184 (diff)
downloadruby-openssl-cf92a3ffba6e5e588540e88c0be7db60cf774572.tar.gz
pkey: prefer PKey.read over PKey::RSA.new in docs
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 2f54b861..ab418764 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -679,13 +679,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
*
@@ -697,7 +697,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
*