Translate verify callback error with compat layer

This commit is contained in:
Juliusz Sosinowicz
2022-08-12 16:27:17 +02:00
parent 126a570a37
commit 551acd2b19
3 changed files with 8 additions and 1 deletions

View File

@@ -11992,7 +11992,11 @@ int DoVerifyCallback(WOLFSSL_CERT_MANAGER* cm, WOLFSSL* ssl, int ret,
}
}
#ifndef OPENSSL_COMPATIBLE_DEFAULTS
store->error = ret;
#else
store->error = GetX509Error(ret);
#endif
store->error_depth = args->certIdx;
store->discardSessionCerts = 0;
store->domain = domain;

View File

@@ -161,7 +161,7 @@ void wolfSSL_X509_STORE_CTX_trusted_stack(WOLFSSL_X509_STORE_CTX *ctx, WOLF_STAC
/* Returns corresponding X509 error from internal ASN error <e> */
static int GetX509Error(int e)
int GetX509Error(int e)
{
switch (e) {
case ASN_BEFORE_DATE_E:

View File

@@ -5605,6 +5605,9 @@ WOLFSSL_LOCAL int wolfSSL_StaticEphemeralKeyLoad(WOLFSSL* ssl, int keyAlgo, void
WOLFSSL_LOCAL int wolfSSL_ASN1_STRING_canon(WOLFSSL_ASN1_STRING* asn_out,
const WOLFSSL_ASN1_STRING* asn_in);
#endif
#ifdef OPENSSL_EXTRA
WOLFSSL_LOCAL int GetX509Error(int e);
#endif
#endif
#if defined(HAVE_EX_DATA) && \