# endif /* OPENSSL_NO_DYNAMIC_ENGINE */
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
+static int ecxnids[] = {
+ NID_X25519,
+ NID_X448,
+ NID_ED25519,
+ NID_ED448
+};
+
+/* Test that creating ECX keys with a short private key fails as expected */
+static int test_ecx_short_keys(int tst)
+{
+ unsigned char ecxkeydata = 1;
+ EVP_PKEY *pkey;
+
+
+ pkey = EVP_PKEY_new_raw_private_key(ecxnids[tst], NULL, &ecxkeydata, 1);
+ if (!TEST_ptr_null(pkey)) {
+ EVP_PKEY_free(pkey);
+ return 0;
+ }
+ return 1;
+}
+
typedef enum OPTION_choice {
OPT_ERR = -1,
OPT_EOF = 0,
# endif
#endif
+ ADD_ALL_TESTS(test_ecx_short_keys, OSSL_NELEM(ecxnids));
+
return 1;
}