a1fb602
diff -up openssl-1.0.2a/crypto/x509/by_file.c.x509 openssl-1.0.2a/crypto/x509/by_file.c
a1fb602
--- openssl-1.0.2a/crypto/x509/by_file.c.x509	2015-04-09 18:16:29.365456157 +0200
a1fb602
+++ openssl-1.0.2a/crypto/x509/by_file.c	2015-04-09 18:16:26.398387618 +0200
a1fb602
@@ -152,9 +152,12 @@ int X509_load_cert_file(X509_LOOKUP *ctx
a1fb602
                 }
a1fb602
             }
a1fb602
             i = X509_STORE_add_cert(ctx->store_ctx, x);
a1fb602
-            if (!i)
a1fb602
-                goto err;
a1fb602
-            count++;
a1fb602
+            /* ignore any problems with current certificate 
a1fb602
+               and continue with the next one */
a1fb602
+            if (i)
a1fb602
+                count++;
a1fb602
+            else
a1fb602
+                ERR_clear_error();
a1fb602
             X509_free(x);
a1fb602
             x = NULL;
a1fb602
         }
a1fb602
@@ -167,7 +170,7 @@ int X509_load_cert_file(X509_LOOKUP *ctx
a1fb602
         }
a1fb602
         i = X509_STORE_add_cert(ctx->store_ctx, x);
a1fb602
         if (!i)
a1fb602
-            goto err;
a1fb602
+            ERR_clear_error();
a1fb602
         ret = i;
a1fb602
     } else {
a1fb602
         X509err(X509_F_X509_LOAD_CERT_FILE, X509_R_BAD_X509_FILETYPE);