summaryrefslogtreecommitdiffstats
path: root/crypto/evp/pbe_scrypt.c
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2020-08-07 14:29:00 +1000
committerShane Lontis <shane.lontis@oracle.com>2020-08-07 14:29:00 +1000
commit5ccada09aae0cf846d3381a161d3eb20d4d9abfd (patch)
tree39fc4e655a53c146bc6a8fcde3f0746c56a97a1c /crypto/evp/pbe_scrypt.c
parent64827f407b0b603f585d7fadfd7e61a60ed7a45b (diff)
Add evp_test fixes.
Changed many tests so they also test fips (and removed 'availablein = default' from some tests). Seperated the monolithic evppkey.txt file into smaller maintainable groups. Changed the availablein option so it must be first - this then skips the entire test before any fetching happens. Changed the code so that all the OPENSSL_NO_XXXX tests are done in code via methods such as is_cipher_disabled(alg), before the fetch happens. Added missing libctx's found by adding a libctx to test_evp. Broke up large data files for cipher, kdf's and mac's into smaller pieces so they no longer need 'AvailableIn = default' Added missing algorithm aliases for cipher/digests to the providers. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12236)
Diffstat (limited to 'crypto/evp/pbe_scrypt.c')
-rw-r--r--crypto/evp/pbe_scrypt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/evp/pbe_scrypt.c b/crypto/evp/pbe_scrypt.c
index fa7b1de17c..97997377e1 100644
--- a/crypto/evp/pbe_scrypt.c
+++ b/crypto/evp/pbe_scrypt.c
@@ -46,7 +46,7 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen,
OSSL_PARAM params[7], *z = params;
if (r > UINT32_MAX || p > UINT32_MAX) {
- EVPerr(EVP_F_EVP_PBE_SCRYPT, EVP_R_PARAMETER_TOO_LARGE);
+ EVPerr(0, EVP_R_PARAMETER_TOO_LARGE);
return 0;
}
@@ -62,6 +62,7 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen,
if (maxmem == 0)
maxmem = SCRYPT_MAX_MEM;
+ /* Use OPENSSL_CTX_set0_default() if you need a library context */
kdf = EVP_KDF_fetch(NULL, OSSL_KDF_NAME_SCRYPT, NULL);
kctx = EVP_KDF_CTX_new(kdf);
EVP_KDF_free(kdf);