From 8931b30d8478b0bd24af251fac64e7b0bf121369 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Wed, 12 Mar 2008 21:14:28 +0000 Subject: And so it begins... Initial support for CMS. Add zlib compression BIO. Add AES key wrap implementation. Generalize S/MIME MIME code to support CMS and/or PKCS7. --- crypto/pem/pem.h | 1 + crypto/pem/pem_lib.c | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'crypto/pem') 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; } -- cgit v1.2.3