diff options
Diffstat (limited to 'crypto/pem')
-rw-r--r-- | crypto/pem/pem.h | 1 | ||||
-rw-r--r-- | crypto/pem/pem_lib.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/crypto/pem/pem.h b/crypto/pem/pem.h index 96e39d47f5..b361e14dcc 100644 --- a/crypto/pem/pem.h +++ b/crypto/pem/pem.h @@ -134,6 +134,7 @@ extern "C" { #define PEM_STRING_ECPARAMETERS "EC PARAMETERS" #define PEM_STRING_ECPRIVATEKEY "EC PRIVATE KEY" #define PEM_STRING_PARAMETERS "PARAMETERS" +#define PEM_STRING_CMS "CMS" /* Note that this structure is initialised by PEM_SealInit and cleaned up by PEM_SealFinal (at least for now) */ diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 02237b01c7..43604d19ff 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -256,6 +256,14 @@ static int check_pem(const char *nm, const char *name) if(!strcmp(nm, PEM_STRING_X509) && !strcmp(name, PEM_STRING_PKCS7)) return 1; +#ifndef OPENSSL_NO_CMS + if(!strcmp(nm, PEM_STRING_X509) && + !strcmp(name, PEM_STRING_CMS)) return 1; + /* Allow CMS to be read from PKCS#7 headers */ + if(!strcmp(nm, PEM_STRING_PKCS7) && + !strcmp(name, PEM_STRING_CMS)) return 1; +#endif + return 0; } |