Fixes for building with ./configure --enable-asn=nocrypt. Added wolfCrypt test template for certpiv_test, pending test PIV certs to use.

This commit is contained in:
David Garske
2018-09-26 13:56:10 -07:00
parent 680a863054
commit 0c72dee315
3 changed files with 28 additions and 2 deletions

View File

@@ -1830,6 +1830,7 @@ else
if test "$ENABLED_ASN" = "nocrypt"
then
AM_CFLAGS="$AM_CFLAGS -DNO_ASN_CRYPT"
enable_pwdbased=no
fi
fi
fi
@@ -1851,7 +1852,7 @@ then
ENABLED_SLOWMATH=no
fi
AM_CONDITIONAL([BUILD_ASN], [test "x$ENABLED_ASN" = "xyes"])
AM_CONDITIONAL([BUILD_ASN], [test "x$ENABLED_ASN" != "xno"])
# AES

View File

@@ -5803,6 +5803,9 @@ exit_cs:
#endif /* !NO_ASN_CRYPT */
(void)keyOID;
(void)sigOID;
WOLFSSL_LEAVE("ConfirmSignature", ret);
if (ret != WC_PENDING_E) {
@@ -7454,7 +7457,7 @@ int CheckCertSignature(const byte* cert, word32 certSz, void* heap, void* cm)
#endif
return ret;
}
#endif
#endif /* WOLFSSL_SMALL_CERT_VERIFY */
int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
{

View File

@@ -360,6 +360,9 @@ int blob_test(void);
#ifdef WOLF_CRYPTO_DEV
int cryptodev_test(void);
#endif
#ifdef WOLFSSL_CERT_PIV
int certpiv_test(void);
#endif
/* General big buffer size for many tests. */
#define FOURK_BUF 4096
@@ -1017,6 +1020,13 @@ initDefaultName();
printf( "crypto dev test passed!\n");
#endif
#ifdef WOLFSSL_CERT_PIV
if ( (ret = certpiv_test()) != 0)
return err_sys("cert piv test failed!\n", ret);
else
printf( "cert piv test passed!\n");
#endif
#ifdef WOLFSSL_ASYNC_CRYPT
wolfAsync_DevClose(&devId);
#endif
@@ -20318,6 +20328,18 @@ int cryptodev_test(void)
}
#endif /* WOLF_CRYPTO_DEV */
#ifdef WOLFSSL_CERT_PIV
int certpiv_test(void)
{
/* TODO: Add test for wc_ParseCertPIV */
#if 0
wc_CertPIV piv;
ret = wc_ParseCertPIV(&piv, buf, totalSz);
#endif
return 0;
}
#endif /* WOLFSSL_CERT_PIV */
#undef ERROR_OUT