Although commit
1f246c381e8a7449d84b143ffe50a0818622d2a3 enabled
the self-check functions unconditionally, the #ifdefs AVOID_INTERNALS
remained in lib/crypto-selftests-pk.c.
Signed-off-by: Vitezslav Cizek <vcizek@suse.com>
return 0
-/* This file is also included by the test app in tests/slow/cipher-test, so in that
- * case we cannot depend on gnutls internals */
-#ifndef AVOID_INTERNALS
/* Known answer tests for DH */
static int test_dh(void)
{
return ret;
}
-#endif
/*-
* gnutls_pk_self_test:
case GNUTLS_PK_UNKNOWN:
FALLTHROUGH;
case GNUTLS_PK_DH:
-#ifndef AVOID_INTERNALS
ret = test_dh();
if (ret < 0) {
gnutls_assert();
if (!(flags & GNUTLS_SELF_TEST_FLAG_ALL))
return 0;
-#endif
FALLTHROUGH;
case GNUTLS_PK_RSA:
PK_KNOWN_TEST(GNUTLS_PK_RSA, 1, 2048, GNUTLS_DIG_SHA256,
FALLTHROUGH;
case GNUTLS_PK_EC:
/* Test ECDH and ECDSA */
-#ifndef AVOID_INTERNALS
ret = test_ecdh();
if (ret < 0) {
gnutls_assert();
goto cleanup;
}
-#endif
/* Test ECDSA */
PK_KNOWN_TEST(GNUTLS_PK_EC, 0,
GNUTLS_CURVE_TO_BITS