Remove redundant null check

crl_file is a test argument and can't be null. Besides the code above
already assumes that it's non-null.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2023-10-17 17:26:44 +02:00
parent 21e46b39cc
commit bb7d92c4b2

View File

@ -729,7 +729,7 @@ void x509_verify(char *crt_file, char *ca_file, char *crl_file,
#if defined(MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK)
/* CRLs aren't supported with CA callbacks, so skip the CA callback
* version of the test if CRLs are in use. */
if (crl_file == NULL || strcmp(crl_file, "") == 0) {
if (strcmp(crl_file, "") == 0) {
flags = 0;
res = mbedtls_x509_crt_verify_with_ca_cb(&crt,