diff options
Diffstat (limited to 'src')
| -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 | } |
