aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_x509cert.c
diff options
context:
space:
mode:
authorBart de Water <bartdewater@gmail.com>2020-04-19 11:14:36 -0400
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-04-21 16:33:09 +1200
commitb28fb2f05c1e90130b2d4fdcbdae5234b66bbb05 (patch)
tree80433a4fb91b4c81ba2a38e2cb96de8b04275bf2 /ext/openssl/ossl_x509cert.c
parent2ca54fe46e87f8a14ff9b7c41e21f0c2e013e55e (diff)
downloadruby-openssl-b28fb2f05c1e90130b2d4fdcbdae5234b66bbb05.tar.gz
Look up digest by name instead of constant
Diffstat (limited to 'ext/openssl/ossl_x509cert.c')
-rw-r--r--ext/openssl/ossl_x509cert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/ossl_x509cert.c b/ext/openssl/ossl_x509cert.c
index 40542c4a..e3766b1b 100644
--- a/ext/openssl/ossl_x509cert.c
+++ b/ext/openssl/ossl_x509cert.c
@@ -788,7 +788,7 @@ Init_ossl_x509cert(void)
* root_ca.add_extension(ef.create_extension("keyUsage","keyCertSign, cRLSign", true))
* root_ca.add_extension(ef.create_extension("subjectKeyIdentifier","hash",false))
* root_ca.add_extension(ef.create_extension("authorityKeyIdentifier","keyid:always",false))
- * root_ca.sign(root_key, OpenSSL::Digest::SHA256.new)
+ * root_ca.sign(root_key, OpenSSL::Digest.new('SHA256'))
*
* The next step is to create the end-entity certificate using the root CA
* certificate.
@@ -807,7 +807,7 @@ Init_ossl_x509cert(void)
* ef.issuer_certificate = root_ca
* cert.add_extension(ef.create_extension("keyUsage","digitalSignature", true))
* cert.add_extension(ef.create_extension("subjectKeyIdentifier","hash",false))
- * cert.sign(root_key, OpenSSL::Digest::SHA256.new)
+ * cert.sign(root_key, OpenSSL::Digest.new('SHA256'))
*
*/
cX509Cert = rb_define_class_under(mX509, "Certificate", rb_cObject);