8000 Increase key size to prevent OpenSSL errors. · socketry/async-rspec@3993200 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3993200

Browse files
committed
Increase key size to prevent OpenSSL errors.
1 parent 159246f commit 3993200

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/async/rspec/ssl.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module HostCertificates
4141

4242
::RSpec.shared_context SSL::CertificateAuthority do
4343
# This key size is generally considered insecure, but it's fine for testing.
44-
let(:certificate_authority_key) {OpenSSL::PKey::RSA.new(1024)}
44+
let(:certificate_authority_key) {OpenSSL::PKey::RSA.new(2048)}
4545
let(:certificate_authority_name) {OpenSSL::X509::Name.parse("O=TestCA/CN=localhost")}
4646

4747
# The certificate authority is used for signing and validating the certificate which is used for communciation:
@@ -83,7 +83,7 @@ module HostCertificates
8383
include_context SSL::CertificateAuthority
8484

8585
# The private key to use on the server side:
86-
let(:key) {OpenSSL::PKey::RSA.new(1024)}
86+
let(:key) {OpenSSL::PKey::RSA.new(2048)}
8787
let(:certificate_name) {OpenSSL::X509::Name.parse("O=Test/CN=localhost")}
8888

8989
# The certificate used for actual communication:
@@ -115,7 +115,7 @@ module HostCertificates
115115

116116
let(:keys) do
117117
Hash[
118-
hosts.collect{|name| [name, OpenSSL::PKey::RSA.new(1024)]}
118+
hosts.collect{|name| [name, OpenSSL::PKey::RSA.new(2048)]}
119119
]
120120
end
121121

@@ -177,8 +177,8 @@ module HostCertificates
177177
include_context SSL::CertificateAuthority
178178

179179
# The private key to use on the server side:
180-
let(:key) {OpenSSL::PKey::RSA.new(1024)}
181-
let(:invalid_key) {OpenSSL::PKey::RSA.new(1024)}
180+
let(:key) {OpenSSL::PKey::RSA.new(2048)}
181+
let(:invalid_key) {OpenSSL::PKey::RSA.new(2048)}
182182
let(:certificate_name) {OpenSSL::X509::Name.parse("O=Test/CN=localhost")}
183183

184184
# The certificate used for actual communication:

0 commit comments

Comments
 (0)
0