]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix PKINIT CMS error checking for older OpenSSL
authorGreg Hudson <ghudson@mit.edu>
Tue, 13 Dec 2022 18:15:28 +0000 (13:15 -0500)
committerGreg Hudson <ghudson@mit.edu>
Thu, 6 Jul 2023 21:10:16 +0000 (17:10 -0400)
commita6971d269577afa68584d6076bd90f84c2099f93
tree772cf21ddeb86143a5a78fb174e77c9a19f32ce5
parent9a2051998c9446f56ba40a29e56c625b83e38467
Fix PKINIT CMS error checking for older OpenSSL

Commit 70f61d417261ca17efe3d60d180033bea2da60b0 updated the
CMS_verify() error code checks, using two error codes new to OpenSSL
3.0 (RSA_R_DIGEST_NOT_ALLOWED and CMS_R_UNKNOWN_DIGEST_ALGORITHM).
This change broke the build for OpenSSL 1.0 and 1.1.

Instead of looking for codes indicating an algorithm issue and
assuming that everything else is an invalid signature, check for the
code indicating an invalid signature and assume that everything else
is an algorithm issue.

(cherry picked from commit e48e2e56a05a47fd932a941ac82c1131ceed47d0)

ticket: 9069
version_fixed: 1.20.2
src/plugins/preauth/pkinit/pkinit_crypto_openssl.c