From: Richard Levitte Date: Tue, 23 Apr 2002 13:15:22 +0000 (+0000) Subject: Uhmmm, if we use && after having tested for the presence of the certificate, X-Git-Tag: OpenSSL_0_9_6d~18 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1c4dc1517d31f64cd13dc85014d3ac53b30ba5f0;p=oweals%2Fopenssl.git Uhmmm, if we use && after having tested for the presence of the certificate, we just *might* stand a certain chance of actually getting it written to file... --- diff --git a/crypto/pem/pem_info.c b/crypto/pem/pem_info.c index 98a8510e15..ef02599d55 100644 --- a/crypto/pem/pem_info.c +++ b/crypto/pem/pem_info.c @@ -346,7 +346,7 @@ int PEM_X509_INFO_write_bio(BIO *bp, X509_INFO *xi, EVP_CIPHER *enc, } /* if we have a certificate then write it out now */ - if ((xi->x509 != NULL) || (PEM_write_bio_X509(bp,xi->x509) <= 0)) + if ((xi->x509 != NULL) && (PEM_write_bio_X509(bp,xi->x509) <= 0)) goto err; /* we are ignoring anything else that is loaded into the X509_INFO