diff options
author | Rich Salz <rsalz@openssl.org> | 2017-04-20 15:33:42 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-04-20 15:33:42 -0400 |
commit | c0452248ea1a59a41023a4765ef7d9825e80a62b (patch) | |
tree | acf05d2312af49b5cc0b60f9ba38a720458fac3c /crypto/x509/x509_err.c | |
parent | 0444c52a5ff3c2c09f8d7f0f5b464e10231de032 (diff) |
Ignore dups in X509_STORE_add_*
X509_STORE_add_cert and X509_STORE_add_crl are changed to return
success if the object to be added was already found in the store, rather
than returning an error.
Raise errors if empty or malformed files are read when loading certificates
and CRLs.
Remove NULL checks and allow a segv to occur.
Add error handing for all calls to X509_STORE_add_c{ert|tl}
Refactor these two routines into one.
Bring the unit test for duplicate certificates up to date using the test
framework.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2830)
Diffstat (limited to 'crypto/x509/x509_err.c')
-rw-r--r-- | crypto/x509/x509_err.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/x509/x509_err.c b/crypto/x509/x509_err.c index 3f4b8ef0bc..e50b7f6956 100644 --- a/crypto/x509/x509_err.c +++ b/crypto/x509/x509_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -107,8 +107,12 @@ static ERR_STRING_DATA X509_str_reasons[] = { {ERR_REASON(X509_R_METHOD_NOT_SUPPORTED), "method not supported"}, {ERR_REASON(X509_R_NAME_TOO_LONG), "name too long"}, {ERR_REASON(X509_R_NEWER_CRL_NOT_NEWER), "newer crl not newer"}, + {ERR_REASON(X509_R_NO_CERTIFICATE_FOUND), "no certificate found"}, + {ERR_REASON(X509_R_NO_CERTIFICATE_OR_CRL_FOUND), + "no certificate or crl found"}, {ERR_REASON(X509_R_NO_CERT_SET_FOR_US_TO_VERIFY), "no cert set for us to verify"}, + {ERR_REASON(X509_R_NO_CRL_FOUND), "no crl found"}, {ERR_REASON(X509_R_NO_CRL_NUMBER), "no crl number"}, {ERR_REASON(X509_R_PUBLIC_KEY_DECODE_ERROR), "public key decode error"}, {ERR_REASON(X509_R_PUBLIC_KEY_ENCODE_ERROR), "public key encode error"}, |