- switch (cmd) {
- case EVP_KDF_CTRL_SET_PASS:
- case EVP_KDF_CTRL_SET_SALT:
- case EVP_KDF_CTRL_SET_KEY:
- case EVP_KDF_CTRL_SET_TLS_SECRET:
- case EVP_KDF_CTRL_ADD_TLS_SEED:
- case EVP_KDF_CTRL_ADD_HKDF_INFO:
- return EVP_KDF_ctrl(kctx, cmd, (const unsigned char *)p2, (size_t)p1);
-
- case EVP_KDF_CTRL_SET_MD:
- return EVP_KDF_ctrl(kctx, cmd, (const EVP_MD *)p2);
-
- case EVP_KDF_CTRL_SET_HKDF_MODE:
- return EVP_KDF_ctrl(kctx, cmd, (int)p1);
-
- case EVP_KDF_CTRL_SET_SCRYPT_R:
- case EVP_KDF_CTRL_SET_SCRYPT_P:
- u64_value = *(uint64_t *)p2;
- if (u64_value > UINT32_MAX) {
- EVPerr(EVP_F_PKEY_KDF_CTRL, EVP_R_PARAMETER_TOO_LARGE);
- return 0;
+ if (collector != NULL) {
+ switch (cmd) {
+ case T_OCTET_STRING:
+ return collect(collector, p2, p1);
+ default:
+ OPENSSL_assert("You shouldn't be here");
+ break;