mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 05:17:07 +02:00
44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
Patch-Source: https://github.com/daurnimator/lua-http/commit/3c3ed077aea497dadcf94188c30c147eba5e4327
|
|
--
|
|
From 3c3ed077aea497dadcf94188c30c147eba5e4327 Mon Sep 17 00:00:00 2001
|
|
From: daurnimator <quae@daurnimator.com>
|
|
Date: Sun, 20 Jun 2021 00:27:22 +1000
|
|
Subject: [PATCH] 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
|
|
```
|
|
---
|
|
spec/client_spec.lua | 2 +-
|
|
spec/tls_spec.lua | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/spec/client_spec.lua b/spec/client_spec.lua
|
|
index daae1e9c..923d6763 100644
|
|
--- a/spec/client_spec.lua
|
|
+++ b/spec/client_spec.lua
|
|
@@ -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)
|
|
diff --git a/spec/tls_spec.lua b/spec/tls_spec.lua
|
|
index 3be66733..73982fa6 100644
|
|
--- a/spec/tls_spec.lua
|
|
+++ b/spec/tls_spec.lua
|
|
@@ -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))
|