git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/4] t/lib-httpd: increase ssl key size to 2048 bits

From
Jeff King <peff@peff.net>
Date
Feb 1, 2023, 11:39 UTC
Message-ID
<Y9pPbqT8wkysK5Ko@coredump.intra.peff.net>
In-Reply-To
<Y9pOmR5fOfCHwYpF@coredump.intra.peff.net>

Recent versions of openssl will refuse to work with 1024-bit RSA keys, as they are considered insecure. I didn't track down the exact version in which the defaults were tightened, but the Debian-package openssl 3.0 on my system yields:

  $ LIB_HTTPD_SSL=1 ./t5551-http-fetch-smart.sh -v -i
  [...]
  SSL Library Error: error:0A00018F:SSL routines::ee key too small
  1..0 # SKIP web server setup failed

This could probably be overcome with configuration, but that's likely to be a headache (especially if it requires touching /etc/openssl). Let's just pick a key size that's less outrageously out of date.

Signed-off-by: Jeff King <peff@peff.net>
---
 t/lib-httpd/ssl.cnf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/lib-httpd/ssl.cnf b/t/lib-httpd/ssl.cnf
index 6dab2579cb..812e8253f0 100644
--- a/t/lib-httpd/ssl.cnf
+++ b/t/lib-httpd/ssl.cnf
@@ -1,7 +1,7 @@
 RANDFILE                = $ENV::RANDFILE_PATH
 
 [ req ]
-default_bits            = 1024
+default_bits            = 2048
 distinguished_name      = req_distinguished_name
 prompt                  = no
 [ req_distinguished_name ]
-- 
2.39.1.767.gb4615b3bd3
Previous: Jeff KingNext: Todd Zullinger
Message 7 of 9 in “t/lib-httpd ssl fixes”
  1. 0/4 t/lib-httpd ssl fixesJeff King, Feb 1, 2023
  2. 1/4 t/lib-httpd: bump required apache version to 2.2Jeff King, Feb 1, 2023
  3. Todd ZullingerFeb 2, 2023
  4. Jeff KingFeb 3, 2023
  5. 2/4 t/lib-httpd: bump required apache version to 2.4Jeff King, Feb 1, 2023
  6. 3/4 t/lib-httpd: drop SSLMutex configJeff King, Feb 1, 2023
  7. 4/4 t/lib-httpd: increase ssl key size to 2048 bitsJeff King, Feb 1, 2023
  8. Todd ZullingerFeb 2, 2023
  9. Jeff KingFeb 3, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.