diff options
author | jsing <> | 2019-09-06 17:41:05 +0000 |
---|---|---|
committer | jsing <> | 2019-09-06 17:41:05 +0000 |
commit | ad62fd73e219aceeb5b13e772228acd3f93d6b23 (patch) | |
tree | 85ebb84b6159b5f6b54e7fc4e5f458969fc6c783 | |
parent | 6fb67d9aeeb7093cc6c2296d9a8a9ecfafafd6be (diff) | |
download | openbsd-ad62fd73e219aceeb5b13e772228acd3f93d6b23.tar.gz openbsd-ad62fd73e219aceeb5b13e772228acd3f93d6b23.tar.bz2 openbsd-ad62fd73e219aceeb5b13e772228acd3f93d6b23.zip |
Handle CMS PEM headers.
ok inoguchi@ tb@
-rw-r--r-- | src/lib/libcrypto/pem/pem_lib.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/libcrypto/pem/pem_lib.c b/src/lib/libcrypto/pem/pem_lib.c index 6661a222f0..f0126790e9 100644 --- a/src/lib/libcrypto/pem/pem_lib.c +++ b/src/lib/libcrypto/pem/pem_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pem_lib.c,v 1.48 2018/08/24 19:48:39 tb Exp $ */ | 1 | /* $OpenBSD: pem_lib.c,v 1.49 2019/09/06 17:41:05 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -263,6 +263,16 @@ check_pem(const char *nm, const char *name) | |||
263 | !strcmp(name, PEM_STRING_PKCS7)) | 263 | !strcmp(name, PEM_STRING_PKCS7)) |
264 | return 1; | 264 | return 1; |
265 | 265 | ||
266 | #ifndef OPENSSL_NO_CMS | ||
267 | if (strcmp(nm, PEM_STRING_X509) == 0 && | ||
268 | strcmp(name, PEM_STRING_CMS) == 0) | ||
269 | return 1; | ||
270 | |||
271 | /* Allow CMS to be read from PKCS#7 headers */ | ||
272 | if (strcmp(nm, PEM_STRING_PKCS7) == 0 && | ||
273 | strcmp(name, PEM_STRING_CMS) == 0) | ||
274 | return 1; | ||
275 | #endif | ||
266 | 276 | ||
267 | return 0; | 277 | return 0; |
268 | } | 278 | } |