undo changes

fix indentation
This commit is contained in:
Hideki Miyazaki
2026-01-08 07:10:25 +09:00
parent c6dd1a745e
commit 6392c2b420
2 changed files with 25 additions and 17 deletions

View File

@@ -443,10 +443,10 @@ static int X509StoreVerifyCert(WOLFSSL_X509_STORE_CTX* ctx)
#if !defined(NO_ASN_TIME) && defined(OPENSSL_ALL)
if (ret != WC_NO_ERR_TRACE(ASN_BEFORE_DATE_E) &&
ret != WC_NO_ERR_TRACE(ASN_AFTER_DATE_E)) {
/* With OpenSSL, we need to check the certificate's date
* after certificate manager verification,
* as it skips date validation when other errors are present.
*/
/* With OpenSSL, we need to check the certificate's date
* after certificate manager verification,
* as it skips date validation when other errors are present.
*/
ret = X509StoreVerifyCertDate(ctx, ret);
SetupStoreCtxError(ctx, ret);
ret = ret == WOLFSSL_SUCCESS ? 1 : 0;

View File

@@ -39,23 +39,10 @@
#if defined(OPENSSL_ALL) && \
!defined(NO_RSA) && !defined(NO_FILESYSTEM)
static int last_errcode;
static int last_errdepth;
static int last_errcodes[10];
static int last_errdepths[10];
static int err_index = 0;
static int X509Callback(int ok, X509_STORE_CTX *ctx)
{
if (!ok) {
last_errcode = X509_STORE_CTX_get_error(ctx);
last_errdepth = X509_STORE_CTX_get_error_depth(ctx);
}
/* Always return OK to allow verification to continue.*/
return 1;
}
static int X509CallbackCount(int ok, X509_STORE_CTX *ctx)
{
if (!ok) {
@@ -1029,6 +1016,24 @@ int test_X509_STORE_untrusted(void)
return EXPECT_RESULT();
}
#if defined(OPENSSL_ALL) && !defined(NO_RSA) && !defined(NO_FILESYSTEM)
static int last_errcode;
static int last_errdepth;
static int X509Callback(int ok, X509_STORE_CTX *ctx)
{
if (!ok) {
last_errcode = X509_STORE_CTX_get_error(ctx);
last_errdepth = X509_STORE_CTX_get_error_depth(ctx);
}
/* Always return OK to allow verification to continue.*/
return 1;
}
#endif
int test_X509_STORE_InvalidCa(void)
{
EXPECT_DECLS;
@@ -1043,6 +1048,9 @@ int test_X509_STORE_InvalidCa(void)
X509* cert = NULL;
STACK_OF(X509)* untrusted = NULL;
last_errcode = 0;
last_errdepth = 0;
ExpectTrue((fp = XFOPEN(srvfile, "rb"))
!= XBADFILE);
ExpectNotNull(cert = PEM_read_X509(fp, 0, 0, 0 ));