sync code with last improvements from OpenBSD

This commit is contained in:
purplerain 2023-08-18 19:17:13 +00:00
parent 27298272ec
commit 7116a5838e
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
35 changed files with 509 additions and 254 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: x509_purp.c,v 1.28 2023/07/02 17:12:17 tb Exp $ */
/* $OpenBSD: x509_purp.c,v 1.29 2023/08/18 08:42:41 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2001.
*/
@ -550,7 +550,8 @@ x509v3_cache_extensions_internal(X509 *x)
if (x->ex_flags & EXFLAG_SET)
return;
X509_digest(x, X509_CERT_HASH_EVP, x->hash, NULL);
if (!X509_digest(x, X509_CERT_HASH_EVP, x->hash, NULL))
x->ex_flags |= EXFLAG_INVALID;
version = X509_get_version(x);
if (version < 0 || version > 2)