summaryrefslogtreecommitdiff
path: root/sample/openssl/smime_write.rb
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 /sample/openssl/smime_write.rb
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 'sample/openssl/smime_write.rb')
-rw-r--r--sample/openssl/smime_write.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/sample/openssl/smime_write.rb b/sample/openssl/smime_write.rb
index 5a5236c7507..20c933b288a 100644
--- a/sample/openssl/smime_write.rb
+++ b/sample/openssl/smime_write.rb
@@ -9,7 +9,7 @@ key_file = options["k"]
rcpt_file = options["r"]
cert = X509::Certificate.new(File::read(cert_file))
-key = PKey::RSA.new(File::read(key_file))
+key = PKey::read(File::read(key_file))
data = "Content-Type: text/plain\r\n"
data << "\r\n"