summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_err.c
diff options
context:
space:
mode:
authorschwarze <>2021-11-10 13:57:42 +0000
committerschwarze <>2021-11-10 13:57:42 +0000
commitf4a5a07e50a5a0f27254d03bdf06838d718fed07 (patch)
treeac9b43ba8da53df491ad7a1a945cc9e04e5380b5 /src/lib/libcrypto/x509/x509_err.c
parent9b0d17c7e0c52e06c77513dcea41c96ddc84e6c5 (diff)
downloadopenbsd-f4a5a07e50a5a0f27254d03bdf06838d718fed07.tar.gz
openbsd-f4a5a07e50a5a0f27254d03bdf06838d718fed07.tar.bz2
openbsd-f4a5a07e50a5a0f27254d03bdf06838d718fed07.zip
If X509_load_cert_crl_file(3) does not find any certificates
and/or CRLs in the PEM input file (for example, if the file is empty), provide an error message in addition to returning 0. This merges another part of this OpenSSL commit, which is still under a free license: commit c0452248ea1a59a41023a4765ef7d9825e80a62b Author: Rich Salz <rsalz@openssl.org> Date: Thu Apr 20 15:33:42 2017 -0400 I did *not* add the similar message types X509_R_NO_CERTIFICATE_FOUND and X509_R_NO_CRL_FOUND because both code inspection and testing have shown that the code generating them is unreachable. OK tb@
Diffstat (limited to 'src/lib/libcrypto/x509/x509_err.c')
-rw-r--r--src/lib/libcrypto/x509/x509_err.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_err.c b/src/lib/libcrypto/x509/x509_err.c
index cac734ddf9..a8e9155718 100644
--- a/src/lib/libcrypto/x509/x509_err.c
+++ b/src/lib/libcrypto/x509/x509_err.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_err.c,v 1.15 2020/06/05 16:51:12 jsing Exp $ */ 1/* $OpenBSD: x509_err.c,v 1.16 2021/11/10 13:57:42 schwarze Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -96,6 +96,7 @@ static ERR_STRING_DATA X509_str_reasons[] = {
96 {ERR_REASON(X509_R_LOADING_CERT_DIR) , "loading cert dir"}, 96 {ERR_REASON(X509_R_LOADING_CERT_DIR) , "loading cert dir"},
97 {ERR_REASON(X509_R_LOADING_DEFAULTS) , "loading defaults"}, 97 {ERR_REASON(X509_R_LOADING_DEFAULTS) , "loading defaults"},
98 {ERR_REASON(X509_R_METHOD_NOT_SUPPORTED) , "method not supported"}, 98 {ERR_REASON(X509_R_METHOD_NOT_SUPPORTED) , "method not supported"},
99 {ERR_REASON(X509_R_NO_CERTIFICATE_OR_CRL_FOUND), "no certificate or crl found"},
99 {ERR_REASON(X509_R_NO_CERT_SET_FOR_US_TO_VERIFY), "no cert set for us to verify"}, 100 {ERR_REASON(X509_R_NO_CERT_SET_FOR_US_TO_VERIFY), "no cert set for us to verify"},
100 {ERR_REASON(X509_R_PUBLIC_KEY_DECODE_ERROR), "public key decode error"}, 101 {ERR_REASON(X509_R_PUBLIC_KEY_DECODE_ERROR), "public key decode error"},
101 {ERR_REASON(X509_R_PUBLIC_KEY_ENCODE_ERROR), "public key encode error"}, 102 {ERR_REASON(X509_R_PUBLIC_KEY_ENCODE_ERROR), "public key encode error"},