PR: 2710
authorDr. Stephen Henson <steve@openssl.org>
Fri, 10 Feb 2012 19:54:54 +0000 (19:54 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 10 Feb 2012 19:54:54 +0000 (19:54 +0000)
Submitted by: Tomas Mraz <tmraz@redhat.com>

Check return codes for load_certs_crls.

apps/apps.c

index b9df6f9e2d8022e513e6715a0b99599b399a58a1..9eff4efb50b6ac97e6b03cdd3b26aa9bdce73381 100644 (file)
@@ -1215,7 +1215,8 @@ STACK_OF(X509) *load_certs(BIO *err, const char *file, int format,
        const char *pass, ENGINE *e, const char *desc)
        {
        STACK_OF(X509) *certs;
        const char *pass, ENGINE *e, const char *desc)
        {
        STACK_OF(X509) *certs;
-       load_certs_crls(err, file, format, pass, e, desc, &certs, NULL);
+       if (!load_certs_crls(err, file, format, pass, e, desc, &certs, NULL))
+               return NULL;
        return certs;
        }       
 
        return certs;
        }       
 
@@ -1223,7 +1224,8 @@ STACK_OF(X509_CRL) *load_crls(BIO *err, const char *file, int format,
        const char *pass, ENGINE *e, const char *desc)
        {
        STACK_OF(X509_CRL) *crls;
        const char *pass, ENGINE *e, const char *desc)
        {
        STACK_OF(X509_CRL) *crls;
-       load_certs_crls(err, file, format, pass, e, desc, NULL, &crls);
+       if (!load_certs_crls(err, file, format, pass, e, desc, NULL, &crls))
+               return NULL;
        return crls;
        }       
 
        return crls;
        }