From: Mark Atwood <mark@wolfssl.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH common v2 0/2] ticket: sign RSA tickets with SHA-256, opt-in
Date: Fri, 13 Nov 2026 03:06:37 +0000 [thread overview]
Message-ID: <20261113030639.3514-1-mark@wolfssl.com> (raw)
Let PVE::Ticket verify RSA tickets signed with SHA-256, and optionally sign
with it, so that PVE and PMG work with crypto providers that refuse SHA-1
signatures, e.g. FIPS ones. Signing with SHA-256 stays opt-in: callers pass a
new, optional hash parameter, and the default is still SHA-1.
This also affects Proxmox Mail Gateway, which uses PVE::Ticket for its
tickets. The pve-common patches state it in their commit messages. SHA-256
signing stays off there unless PMG passes the new parameter.
Apply order across the repositories, all three are part of this series:
1. pve-common (2 patches)
2. pve-cluster (adds the datacenter.cfg option)
3. pve-access-control (reads the option and signs with it)
pve-common and pve-cluster are independent of each other. pve-access-control
needs both, but is harmless without them: it then keeps signing with SHA-1.
Mixed clusters: nodes without pve-common 1/2 reject SHA-256 tickets, so the
option must only be set to 'sha256' once every node has that patch. The option
description says so. I did not add an automatic check against the node
versions (the new helpers in pve-cluster, 679cf2c, would allow one), as it
needs the release number that will contain 1/2. Happy to add one in
pve-manager's datacenter options update once that number is known.
Tested on a PVE 9.2 node with wolfProvider (FIPS) set up for pvedaemon: with the
option unset, logins fail as before, and with 'sha256', API and web logins work
and the tickets verify with SHA-256 only.
Changes since v1:
- rebased onto current master, which has the new ticket tests (0163eaf,
0f928d5, 0b3129a); the v1 patches did not apply any more
- tests are now part of the existing test/ticket_test.pl instead of a new
test file
- 1/2: added the TODO to remove the SHA-1 fallback once SHA-256 signed tickets
are the default across PMG and PVE for at least one major release
- 1/2: $rsa_pub is now reset unconditionally to the library default (SHA-1)
after verifying, instead of keeping whichever hash matched; the commit
message explains why this was preferred over documenting it
- 1/2: the eval no longer swallows all errors; it only ignores the refusal of
SHA-1 (wolfProvider's "RSA.xs:1007: OpenSSL error: (null)", seen when
signing) and warns about anything else
- 1/2: added a test that verification succeeds without $noerr; the tests use
tickets signed with the openssl command line as the reference
- 1/2, 2/2: the commit messages mention PMG
- 2/2: SHA-256 signing is opt-in through an optional parameter of
assemble_rsa_ticket() with unchanged default, instead of switching to
SHA-256 and using the PVE_TICKET_SIGN_SHA1 environment variable; the option
itself is in the pve-cluster and pve-access-control patches
v1: <CALkZksWBSdQa5AsvhmANGAJigcZ7FHPtgRgdu3JsRt9NX6vwSg@mail.gmail.com>
This is sent as a new thread, as is usual for a new version of a series.
Thanks to Shannon Sterz for the review of v1.
Mark Atwood (2):
ticket: accept RSA tickets signed with SHA-256
ticket: allow signing RSA tickets with SHA-256
src/PVE/Ticket.pm | 49 +++++++++++++++++-
test/ticket_test.pl | 123 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 170 insertions(+), 2 deletions(-)
base-commit: 7193a0019937de6da53a3078e67f524fabcbf91a
next reply other threads:[~2026-11-13 3:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 3:06 Mark Atwood [this message]
2026-11-13 3:06 ` [PATCH common v2 1/2] ticket: accept RSA tickets signed with SHA-256 Mark Atwood
2026-11-17 16:05 ` Shannon Sterz
2026-11-13 3:06 ` [PATCH common v2 2/2] ticket: allow signing RSA tickets " Mark Atwood
2026-11-17 16:05 ` Shannon Sterz
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=20261113030639.3514-1-mark@wolfssl.com \
--to=mark@wolfssl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox