Skip to content

Commit

Permalink
spec/: use 2048 bit RSA keys for tests
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
daurnimator committed Jun 19, 2021
1 parent b6934d0 commit 3c3ed07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/client_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe("http.client module", function()
s:close()
end
local function new_server_ctx()
local key = openssl_pkey.new()
local key = openssl_pkey.new({type="RSA", bits=2048})
local crt = openssl_x509.new()
crt:setPublicKey(key)
crt:sign(key)
Expand Down
2 changes: 1 addition & 1 deletion spec/tls_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe("http.tls module", function()
ctx:setCipherList(banned_cipher_list)
ctx:setEphemeralKey(openssl_pkey.new{ type = "EC", curve = "prime256v1" })
local crt = openssl_x509.new()
local key = openssl_pkey.new()
local key = openssl_pkey.new({type="RSA", bits=2048})
crt:setPublicKey(key)
crt:sign(key)
assert(ctx:setPrivateKey(key))
Expand Down

0 comments on commit 3c3ed07

Please sign in to comment.