summaryrefslogtreecommitdiff
path: root/lib/webrick/ssl.rb
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-03 04:51:08 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-03 04:51:08 +0000
commita063f71a7ccc733d8ab4b997dfc3ffb1ab987afc (patch)
tree354c4fd30a7a2e97be143b550eed58eb53978890 /lib/webrick/ssl.rb
parentb94e344b9df6af54fb91e69537d65161911f2599 (diff)
webrick: fix tests on Debian sid/unstable with OpenSSL 1.1.1a
OpenSSL complains abour our keys being small and weak :< Make them big and strong with 2048-bit RSA keys and SHA256 digests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/webrick/ssl.rb')
-rw-r--r--lib/webrick/ssl.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/webrick/ssl.rb b/lib/webrick/ssl.rb
index 8a334eaff1..d125083528 100644
--- a/lib/webrick/ssl.rb
+++ b/lib/webrick/ssl.rb
@@ -130,7 +130,7 @@ module WEBrick
aki = ef.create_extension("authorityKeyIdentifier",
"keyid:always,issuer:always")
cert.add_extension(aki)
- cert.sign(rsa, OpenSSL::Digest::SHA1.new)
+ cert.sign(rsa, OpenSSL::Digest::SHA256.new)
return [ cert, rsa ]
end
@@ -181,7 +181,7 @@ module WEBrick
unless config[:SSLCertificate]
cn = config[:SSLCertName]
comment = config[:SSLCertComment]
- cert, key = Utils::create_self_signed_cert(1024, cn, comment)
+ cert, key = Utils::create_self_signed_cert(2048, cn, comment)
config[:SSLCertificate] = cert
config[:SSLPrivateKey] = key
end