diff options
author | 2019-09-06 17:41:05 +0000 | |
---|---|---|
committer | 2019-09-06 17:41:05 +0000 | |
commit | 2df0f7a19cb6fd1bbfef2eee71f78d3b6aaae8c2 (patch) | |
tree | e985269246039501a4756c335645747b4a34612c | |
parent | Do not stop prologue scan at branch instructions. This lets stack trace (diff) | |
download | wireguard-openbsd-2df0f7a19cb6fd1bbfef2eee71f78d3b6aaae8c2.tar.xz wireguard-openbsd-2df0f7a19cb6fd1bbfef2eee71f78d3b6aaae8c2.zip |
Handle CMS PEM headers.
ok inoguchi@ tb@
-rw-r--r-- | lib/libcrypto/pem/pem_lib.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libcrypto/pem/pem_lib.c b/lib/libcrypto/pem/pem_lib.c index 6661a222f00..f0126790e96 100644 --- a/lib/libcrypto/pem/pem_lib.c +++ b/lib/libcrypto/pem/pem_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pem_lib.c,v 1.48 2018/08/24 19:48:39 tb Exp $ */ +/* $OpenBSD: pem_lib.c,v 1.49 2019/09/06 17:41:05 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -263,6 +263,16 @@ check_pem(const char *nm, const char *name) !strcmp(name, PEM_STRING_PKCS7)) return 1; +#ifndef OPENSSL_NO_CMS + if (strcmp(nm, PEM_STRING_X509) == 0 && + strcmp(name, PEM_STRING_CMS) == 0) + return 1; + + /* Allow CMS to be read from PKCS#7 headers */ + if (strcmp(nm, PEM_STRING_PKCS7) == 0 && + strcmp(name, PEM_STRING_CMS) == 0) + return 1; +#endif return 0; } |