From: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-cluster v4 1/3] fix #6701: Add keyUsage extension to root CA
Date: Tue, 17 Mar 2026 17:53:56 +0100 [thread overview]
Message-ID: <20260317165358.620306-2-a.bied-charreton@proxmox.com> (raw)
In-Reply-To: <20260317165358.620306-1-a.bied-charreton@proxmox.com>
Add the keyUsage[0] extension to the PVE root CA to comply with RFC
5280, which Python decided to enforce as of 3.13 by adding the
VERIFY_X509_STRICT flag from its `ssl` module [1], which breaks some
clients like Ansible. This change of behavior is documented by
`create_default_context` [2].
The authorityKeyIdentifier [3] and subjectKeyIdentifier [4] extensions are
required by RFC 5280 as well, however OpenSSL adds them in by default
based on /etc/ssl/openssl.cnf, so there is no need for explicitly
passing them.
Test script:
```
import socket, ssl
ctx = ssl.create_default_context(cafile="/etc/pve/pve-root-ca.pem")
ctx.wrap_socket(socket.create_connection(("localhost", 8006)),
server_hostname="localhost")
print("success")
```
[0] https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.3
[1] https://docs.python.org/3/library/ssl.html
[2] https://docs.python.org/3/library/ssl.html#ssl.create_default_context
[3] https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.1
[4] https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.2
Signed-off-by: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
---
src/PVE/Cluster/Setup.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/PVE/Cluster/Setup.pm b/src/PVE/Cluster/Setup.pm
index 75d3507..4f528ba 100644
--- a/src/PVE/Cluster/Setup.pm
+++ b/src/PVE/Cluster/Setup.pm
@@ -439,6 +439,8 @@ sub gen_pveca_cert {
'-new',
'-x509',
'-nodes',
+ '-addext',
+ 'keyUsage=critical,keyCertSign,cRLSign',
'-key',
$pveca_key_fn,
'-out',
--
2.47.3
next prev parent reply other threads:[~2026-03-17 16:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 16:53 [PATCH cluster v4 0/3] " Arthur Bied-Charreton
2026-03-17 16:53 ` Arthur Bied-Charreton [this message]
2026-03-17 16:53 ` [PATCH pve-cluster v4 2/3] setup: Replace temp OpenSSL config file with CLI arguments Arthur Bied-Charreton
2026-03-17 16:53 ` [PATCH pve-cluster v4 3/3] Create temporary CSR file in /run instead of /tmp Arthur Bied-Charreton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260317165358.620306-2-a.bied-charreton@proxmox.com \
--to=a.bied-charreton@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.