diff options
Diffstat (limited to 'crypto/tlscredsx509.c')
-rw-r--r-- | crypto/tlscredsx509.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/tlscredsx509.c b/crypto/tlscredsx509.c index c5d1a0de30..d080deb83e 100644 --- a/crypto/tlscredsx509.c +++ b/crypto/tlscredsx509.c @@ -485,7 +485,8 @@ qcrypto_tls_creds_x509_sanity_check(QCryptoTLSCredsX509 *creds, int ret = -1; memset(cacerts, 0, sizeof(cacerts)); - if (access(certFile, R_OK) == 0) { + if (certFile && + access(certFile, R_OK) == 0) { cert = qcrypto_tls_creds_load_cert(creds, certFile, isServer, errp); |