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:
case GNUTLS_PK_DH:
+#ifndef AVOID_INTERNALS
ret = test_dh();
if (ret < 0) {
gnutls_assert();
if (all == 0)
return 0;
-
+#endif
case GNUTLS_PK_RSA:
PK_KNOWN_TEST(GNUTLS_PK_RSA, 1, 512, GNUTLS_DIG_SHA1,
rsa_privkey, rsa_sig);
PK_TEST(GNUTLS_PK_DSA, test_sig, 1024, GNUTLS_DIG_SHA1);
case GNUTLS_PK_EC: /* Testing ECDSA */
/* Test ECDH */
+#ifndef AVOID_INTERNALS
ret = test_ecdh();
if (ret < 0) {
gnutls_assert();
if (all == 0)
return 0;
+#endif
/* Test ECDSA */
#ifdef ENABLE_NON_SUITEB_CURVES
}
#ifndef ENABLE_SELF_CHECKS
-#include "../../lib/crypto-selftests.c"
-#include "../../lib/crypto-selftests-pk.c"
+# define AVOID_INTERNALS
+# include "../../lib/crypto-selftests.c"
+# include "../../lib/crypto-selftests-pk.c"
#endif
int main(int argc, char **argv)