]> git.proxmox.com Git - pve-apiclient.git/commit
fix validation of self-signed cert chains
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 26 Mar 2024 08:15:02 +0000 (09:15 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 26 Mar 2024 08:34:33 +0000 (09:34 +0100)
commit6c8c78d01ab449ba30a1f93d967f155482702c35
tree1515eb02f4954ff5f3f18722dcb46bab6debd955
parentdfee5e09acd529f28c7565f380f2dd3415cd92e7
fix validation of self-signed cert chains

The interface here is a bit weird - if the verify callback returns 1
for a certificate higher up in the chain, this will propagate to the
next invocation of the callback for the next certificate, even if
openssl on its own would not trust the certificate.

By re-ordering the checks and keeping track of the fact that we
returned 1 despite openssl failing its own validation, the validation
logic should now cover all combinations of certificate count and
self-signed/system trust status.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/APIClient/LWP.pm