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