key_rsa_pub_data.get(), key_rsa_pub_data_len, &out));
}
-RUNNER_TEST(T4240_yaca_key_export_import, YacaTest)
+RUNNER_TEST(T4240_yaca_key_derive_pbkdf2_invalid_param, YacaTest)
+{
+ yaca_key_h key;
+
+ YACA_INVALID_PARAM(yaca_key_derive_pbkdf2(nullptr, "salt", 4, 1, YACA_DIGEST_MD5, 128, &key));
+ YACA_INVALID_PARAM(yaca_key_derive_pbkdf2("pass", nullptr, 4, 1, YACA_DIGEST_MD5, 128, &key));
+ YACA_INVALID_PARAM(yaca_key_derive_pbkdf2("pass", nullptr, 1, 1, YACA_DIGEST_MD5, 128, &key));
+ YACA_INVALID_PARAM(yaca_key_derive_pbkdf2("pass", "salt", 0, 1, YACA_DIGEST_MD5, 128, &key));
+ YACA_INVALID_PARAM(yaca_key_derive_pbkdf2("pass", "salt", 4, 0, YACA_DIGEST_MD5, 128, &key));
+ YACA_INVALID_PARAM(yaca_key_derive_pbkdf2("pass", "salt", 4, 1,
+ static_cast<yaca_digest_algorithm_e>(-1),128, &key));
+ YACA_INVALID_PARAM(yaca_key_derive_pbkdf2("pass", "salt", 4, 1, YACA_DIGEST_MD5, 0, &key));
+ YACA_INVALID_PARAM(yaca_key_derive_pbkdf2("pass", "salt", 4, 1, YACA_DIGEST_MD5, 127, &key));
+ YACA_INVALID_PARAM(yaca_key_derive_pbkdf2("pass", "salt", 4, 1, YACA_DIGEST_MD5, 128, nullptr));
+
+ /* implementation specific tests, might go away at some point */
+ YACA_INVALID_PARAM(yaca_key_derive_pbkdf2("pass", "salt", 4, static_cast<size_t>(INT_MAX) + 1,
+ YACA_DIGEST_MD5, 128, &key));
+}
+
+RUNNER_TEST(T4250_yaca_key_export_import, YacaTest)
{
auto tvv = loadTestVector("key.txt");
}
}
-RUNNER_TEST(T4250_yaca_key_import_x509, YacaTest)
+RUNNER_TEST(T4260_yaca_key_import_x509, YacaTest)
{
auto tvv = loadTestVector("key_x509.txt");