Skip to content

Commit 3c3ed07

Browse files
committed
spec/: use 2048 bit RSA keys for tests
Some OpenSSL libraries have smaller key sizes disabled. Failure looks like: ``` ssl.context:setCertificate: ssl_rsa.c:310:error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small ```
1 parent b6934d0 commit 3c3ed07

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spec/client_spec.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe("http.client module", function()
5252
s:close()
5353
end
5454
local function new_server_ctx()
55-
local key = openssl_pkey.new()
55+
local key = openssl_pkey.new({type="RSA", bits=2048})
5656
local crt = openssl_x509.new()
5757
crt:setPublicKey(key)
5858
crt:sign(key)

spec/tls_spec.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe("http.tls module", function()
2828
ctx:setCipherList(banned_cipher_list)
2929
ctx:setEphemeralKey(openssl_pkey.new{ type = "EC", curve = "prime256v1" })
3030
local crt = openssl_x509.new()
31-
local key = openssl_pkey.new()
31+
local key = openssl_pkey.new({type="RSA", bits=2048})
3232
crt:setPublicKey(key)
3333
crt:sign(key)
3434
assert(ctx:setPrivateKey(key))

0 commit comments

Comments
 (0)