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)
BIO_printf(bio_err, ", Iteration %ld, PRF %s",
ASN1_INTEGER_get(kdf->iter), OBJ_nid2sn(prfnid));
PBKDF2PARAM_free(kdf);
+#ifndef OPENSSL_NO_SCRYPT
} else if (pbenid == NID_id_scrypt) {
SCRYPT_PARAMS *kdf = NULL;
ASN1_INTEGER_get(kdf->blockSize),
ASN1_INTEGER_get(kdf->parallelizationParameter));
SCRYPT_PARAMS_free(kdf);
+#endif
}
PBE2PARAM_free(pbe2);
} else {
#include "internal/cryptlib.h"
#include "internal/evp_int.h"
+#ifndef OPENSSL_NO_SCRYPT
+
static int atou64(const char *nptr, uint64_t *result);
typedef struct {
pkey_scrypt_ctrl,
pkey_scrypt_ctrl_str
};
+
+#endif
return 1;
}
+#ifndef OPENSSL_NO_SCRYPT
static int test_kdf_scrypt(void)
{
EVP_PKEY_CTX *pctx;
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;
}