Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 5db08e6437975e1c302c6a9ca7a7a063 > files > 12

openssl-1.0.1p-1.mga4.src.rpm

Do not treat duplicate certs as an error.

--- openssl-0.9.6/crypto/x509/by_file.c	Wed Sep 27 15:09:05 2000
+++ openssl-0.9.6/crypto/x509/by_file.c	Wed Sep 27 14:21:20 2000
@@ -152,9 +152,12 @@
                 }
             }
             i = X509_STORE_add_cert(ctx->store_ctx, x);
-            if (!i)
-                goto err;
-            count++;
+            /* ignore any problems with current certificate 
+               and continue with the next one */
+            if (i)
+                count++;
+            else
+                ERR_clear_error();
             X509_free(x);
             x = NULL;
         }
@@ -167,7 +170,7 @@
         }
         i = X509_STORE_add_cert(ctx->store_ctx, x);
         if (!i)
-            goto err;
+            ERR_clear_error();
         ret = i;
     } else {
         X509err(X509_F_X509_LOAD_CERT_FILE, X509_R_BAD_X509_FILETYPE);