summarylogtreecommitdiffstats
path: root/openssl-0.9.6-x509.patch
blob: f769b35561fe7d5b390d393d76a2485e4be4f5a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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
@@ -163,9 +163,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;
         }
@@ -179,8 +183,8 @@
             goto err;
         }
         i = X509_STORE_add_cert(ctx->store_ctx, x);
-        if (!i)
-            goto err;
+        if (!i)
+          ERR_clear_error();
         ret = i;
     } else {
         X509err(X509_F_X509_LOAD_CERT_FILE, X509_R_BAD_X509_FILETYPE);
--- openssl-0.9.6/crypto/store/store.h	2009-08-12 00:57:20.000000000 +0200
+++ openssl-0.9.6/crypto/store/store.h	2009-08-12 01:00:27.000000000 +0200
@@ -70,6 +70,13 @@
 extern "C" {
 #endif
 
+#ifdef OPENSSL_SYS_WIN32
+/* Under Win32 these are defined in wincrypt.h */
+#undef X509_NAME
+#undef X509_CERT_PAIR
+#undef X509_EXTENSIONS
+#endif
+
 /* Already defined in ossl_typ.h */
 /* typedef struct store_st STORE; */
 /* typedef struct store_method_st STORE_METHOD; */
--- openssl-0.9.6/crypto/pem/pem.h	2009-08-12 01:14:59.000000000 +0200
+++ openssl-0.9.6/crypto/pem/pem.h	2009-08-12 01:15:01.000000000 +0200
@@ -74,6 +74,13 @@
 extern "C" {
 #endif
 
+#ifdef OPENSSL_SYS_WIN32
+/* Under Win32 these are defined in wincrypt.h */
+#undef X509_NAME
+#undef X509_CERT_PAIR
+#undef X509_EXTENSIONS
+#endif
+
 # define PEM_BUFSIZE             1024
 
 # define PEM_OBJ_UNDEF           0