summaryrefslogtreecommitdiffstats
path: root/test/pkey_meth_kdf_test.c
diff options
context:
space:
mode:
authorJohannes Bauer <joe@johannes-bauer.com>2017-08-08 18:51:41 +0200
committerDr. Stephen Henson <steve@openssl.org>2017-08-08 20:50:44 +0100
commit402f26e6ee56ec295e053d1f6455e910ac398149 (patch)
tree27db406c3255fda1efe80354084b0ca5452909e5 /test/pkey_meth_kdf_test.c
parent5d09b003c080d81ff6adfb6c54be5c018a2ba294 (diff)
Fix building without scrypt
Building without the scrypt KDF is now possible, the OPENSSL_NO_SCRYPT define is honored in code. Previous this lead to undefined references. Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4116)
Diffstat (limited to 'test/pkey_meth_kdf_test.c')
-rw-r--r--test/pkey_meth_kdf_test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/pkey_meth_kdf_test.c b/test/pkey_meth_kdf_test.c
index a2ad91e40d..c832e8eb12 100644
--- a/test/pkey_meth_kdf_test.c
+++ b/test/pkey_meth_kdf_test.c
@@ -60,6 +60,7 @@ static int test_kdf_hkdf(void)
return 1;
}
+#ifndef OPENSSL_NO_SCRYPT
static int test_kdf_scrypt(void)
{
EVP_PKEY_CTX *pctx;
@@ -126,10 +127,13 @@ static int test_kdf_scrypt(void)
EVP_PKEY_CTX_free(pctx);
return 1;
}
+#endif
int setup_tests()
{
ADD_TEST(test_kdf_hkdf);
+#ifndef OPENSSL_NO_SCRYPT
ADD_TEST(test_kdf_scrypt);
+#endif
return 1;
}