summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_ts.c
diff options
context:
space:
mode:
authorBart de Water <[email protected]>2020-04-19 11:14:36 -0400
committerKazuki Yamaguchi <[email protected]>2020-05-13 15:47:51 +0900
commit0b2c70eaa1e8e41fcb6332b22b084dabb81e637c (patch)
treef12d0c69a0b21c56b0df53ecd4615e2d6418d1f0 /ext/openssl/ossl_ts.c
parent3f8665fe0ed5331aa723ddecbf6ad3728931c08d (diff)
[ruby/openssl] Look up digest by name instead of constant
https://github.com/ruby/openssl/commit/b28fb2f05c
Diffstat (limited to 'ext/openssl/ossl_ts.c')
-rw-r--r--ext/openssl/ossl_ts.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/openssl/ossl_ts.c b/ext/openssl/ossl_ts.c
index ba0df750cf..160ec0d8dd 100644
--- a/ext/openssl/ossl_ts.c
+++ b/ext/openssl/ossl_ts.c
@@ -1281,7 +1281,7 @@ Init_ossl_ts(void)
* #Assumes ts.p12 is a PKCS#12-compatible file with a private key
* #and a certificate that has an extended key usage of 'timeStamping'
* p12 = OpenSSL::PKCS12.new(File.open('ts.p12', 'rb'), 'pwd')
- * md = OpenSSL::Digest::SHA1.new
+ * md = OpenSSL::Digest.new('SHA1')
* hash = md.digest(data) #some binary data to be timestamped
* req = OpenSSL::Timestamp::Request.new
* req.algorithm = 'SHA1'
@@ -1498,8 +1498,8 @@ Init_ossl_ts(void)
* Must be an Array of String or OpenSSL::Digest subclass instances.
*
* call-seq:
- * factory.allowed_digests = ["sha1", OpenSSL::Digest::SHA256.new] -> [ "sha1", OpenSSL::Digest::SHA256.new ]
- * factory.allowed_digests -> array or nil
+ * factory.allowed_digests = ["sha1", OpenSSL::Digest.new('SHA256').new] -> [ "sha1", OpenSSL::Digest) ]
+ * factory.allowed_digests -> array or nil
*
*/
cTimestampFactory = rb_define_class_under(mTimestamp, "Factory", rb_cObject);