]> git.ipfire.org Git - thirdparty/openssl.git/commit
Add Version Check for CSR Verification
authorerbsland-dev <github@erbsland.dev>
Wed, 19 Jun 2024 12:02:06 +0000 (14:02 +0200)
committerNeil Horman <nhorman@openssl.org>
Fri, 21 Jun 2024 19:40:45 +0000 (15:40 -0400)
commit7fab3c7d61b0064dcf50db39fb490970c60d9a34
tree15fe447d7cf357649f8a35ea5e4f96f963aeb043
parent03448ba21b5e720f59f7d349fcffd26c53323414
Add Version Check for CSR Verification

Fixes #5738: This change introduces a check for the version number of a CSR document before its signature is verified. If the version number is not 1 (encoded as zero), the verification function fails with an `X509_R_UNSUPPORTED_VERSION` error.

To minimize impact, this check is only applied when verifying a certificate signing request using the `-verify` argument, resulting in a `X509_REQ_verify` call. This ensures that malformed certificate requests are rejected by a certification authority, enhancing security and preventing potential issues.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24677)
crypto/err/openssl.txt
crypto/x509/x509_err.c
crypto/x509/x_all.c
include/openssl/x509err.h