This test did not really execute, since usually
the OPENSSL_malloc(0) will fail and prevent the
execution of the KDF.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16444)
t->err = "KDF_CTRL_ERROR";
return 1;
}
- if (!TEST_ptr(got = OPENSSL_malloc(got_len))) {
+ if (!TEST_ptr(got = OPENSSL_malloc(got_len == 0 ? 1 : got_len))) {
t->err = "INTERNAL_ERROR";
goto err;
}
unsigned char *got = NULL;
size_t got_len = expected->output_len;
- if (!TEST_ptr(got = OPENSSL_malloc(got_len))) {
+ if (!TEST_ptr(got = OPENSSL_malloc(got_len == 0 ? 1 : got_len))) {
t->err = "INTERNAL_ERROR";
goto err;
}
Ctrl.N = n:1048576
Ctrl.r = r:8
Ctrl.p = p:1
-Result = INTERNAL_ERROR
+Result = KDF_MISMATCH
Ctrl.N = N:1048576
Ctrl.r = r:8
Ctrl.p = p:1
-Result = INTERNAL_ERROR
+Result = KDF_MISMATCH