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 5b5da941a4
commit ce9c4f52c4

View File

@ -674,7 +674,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,