Fix the evp tests when no-scrypt is used.
Reviewed-by: Richard Levitte <levitte@openssl.org>
*buflen = len;
return 1;
}
*buflen = len;
return 1;
}
+#ifndef OPENSSL_NO_SCRYPT
+/* Currently only used by scrypt tests */
/* Parse unsigned decimal 64 bit integer value */
static int test_uint64(const char *value, uint64_t *pr)
{
/* Parse unsigned decimal 64 bit integer value */
static int test_uint64(const char *value, uint64_t *pr)
{
/* Structure holding test information */
struct evp_test {
/* Structure holding test information */
struct evp_test {
struct pbe_data *pdat;
int pbe_type = 0;
struct pbe_data *pdat;
int pbe_type = 0;
+ if (strcmp(alg, "scrypt") == 0) {
#ifndef OPENSSL_NO_SCRYPT
#ifndef OPENSSL_NO_SCRYPT
- if (strcmp(alg, "scrypt") == 0)
pbe_type = PBE_TYPE_SCRYPT;
pbe_type = PBE_TYPE_SCRYPT;
+#else
+ t->skip = 1;
+ return 1;
- else if (strcmp(alg, "pbkdf2") == 0)
+ } else if (strcmp(alg, "pbkdf2") == 0) {
pbe_type = PBE_TYPE_PBKDF2;
pbe_type = PBE_TYPE_PBKDF2;
- else if (strcmp(alg, "pkcs12") == 0)
+ } else if (strcmp(alg, "pkcs12") == 0) {
pbe_type = PBE_TYPE_PKCS12;
pbe_type = PBE_TYPE_PKCS12;
fprintf(stderr, "Unknown pbe algorithm %s\n", alg);
fprintf(stderr, "Unknown pbe algorithm %s\n", alg);
pdat = OPENSSL_malloc(sizeof(*pdat));
pdat->pbe_type = pbe_type;
pdat->pass = NULL;
pdat = OPENSSL_malloc(sizeof(*pdat));
pdat->pbe_type = pbe_type;
pdat->pass = NULL;