summaryrefslogtreecommitdiffstats
path: root/crypto/pem
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2008-03-12 21:14:28 +0000
committerDr. Stephen Henson <steve@openssl.org>2008-03-12 21:14:28 +0000
commit8931b30d8478b0bd24af251fac64e7b0bf121369 (patch)
tree04d17028c745633b40b997699bc580c7b4cc600d /crypto/pem
parent27dc105f51361fc71f556e927f621218883b0c26 (diff)
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.
Diffstat (limited to 'crypto/pem')
-rw-r--r--crypto/pem/pem.h1
-rw-r--r--crypto/pem/pem_lib.c8
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;
}