@@ -41,7 +41,7 @@ module HostCertificates
41
41
42
42
::RSpec . shared_context SSL ::CertificateAuthority do
43
43
# 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 ) }
45
45
let ( :certificate_authority_name ) { OpenSSL ::X509 ::Name . parse ( "O=TestCA/CN=localhost" ) }
46
46
47
47
# The certificate authority is used for signing and validating the certificate which is used for communciation:
@@ -83,7 +83,7 @@ module HostCertificates
83
83
include_context SSL ::CertificateAuthority
84
84
85
85
# 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 ) }
87
87
let ( :certificate_name ) { OpenSSL ::X509 ::Name . parse ( "O=Test/CN=localhost" ) }
88
88
89
89
# The certificate used for actual communication:
@@ -115,7 +115,7 @@ module HostCertificates
115
115
116
116
let ( :keys ) do
117
117
Hash [
118
- hosts . collect { |name | [ name , OpenSSL ::PKey ::RSA . new ( 1024 ) ] }
118
+ hosts . collect { |name | [ name , OpenSSL ::PKey ::RSA . new ( 2048 ) ] }
119
119
]
120
120
end
121
121
@@ -177,8 +177,8 @@ module HostCertificates
177
177
include_context SSL ::CertificateAuthority
178
178
179
179
# 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 ) }
182
182
let ( :certificate_name ) { OpenSSL ::X509 ::Name . parse ( "O=Test/CN=localhost" ) }
183
183
184
184
# The certificate used for actual communication:
0 commit comments