Tolerate -----BEGIN PKCS #7 SIGNED DATA----- header lines as used by some
authorDr. Stephen Henson <steve@openssl.org>
Tue, 11 Nov 2008 12:38:25 +0000 (12:38 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 11 Nov 2008 12:38:25 +0000 (12:38 +0000)
implementations.

crypto/pem/pem.h
crypto/pem/pem_lib.c

index bff018f75f6dc20e00788d7df07c46ca4e8542b0..fc9804eea57d167366dfe66d297281723d929b8a 100644 (file)
@@ -125,6 +125,7 @@ extern "C" {
 #define PEM_STRING_DSA         "DSA PRIVATE KEY"
 #define PEM_STRING_DSA_PUBLIC  "DSA PUBLIC KEY"
 #define PEM_STRING_PKCS7       "PKCS7"
+#define PEM_STRING_PKCS7_SIGNED        "PKCS #7 SIGNED DATA"
 #define PEM_STRING_PKCS8       "ENCRYPTED PRIVATE KEY"
 #define PEM_STRING_PKCS8INF    "PRIVATE KEY"
 #define PEM_STRING_DHPARAMS    "DH PARAMETERS"
index 43604d19ff85787e19851411e221009dedabd1cb..a547fdc9339acb2dd6be6e750b76adfd5f1f8ab7 100644 (file)
@@ -256,6 +256,9 @@ static int check_pem(const char *nm, const char *name)
        if(!strcmp(nm, PEM_STRING_X509) &&
                !strcmp(name, PEM_STRING_PKCS7)) return 1;
 
+       if(!strcmp(nm, PEM_STRING_PKCS7_SIGNED) &&
+               !strcmp(name, PEM_STRING_PKCS7)) return 1;
+
 #ifndef OPENSSL_NO_CMS
        if(!strcmp(nm, PEM_STRING_X509) &&
                !strcmp(name, PEM_STRING_CMS)) return 1;