mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-10 10:26:47 +09:00
Add non-namespaced alias sntrup761x25519-sha512 that is being standardized
The specification is now in the last call, data point is allocated so there is no need to stick to the namespaces alias anymore https://datatracker.ietf.org/doc/draft-ietf-sshm-ntruprime-ssh/ Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Sahana Prasad <sahana@redhat.com>
This commit is contained in:
@@ -290,6 +290,40 @@ torture_override_ecdh_sntrup761x25519_sha512_openssh_com(void **state)
|
||||
}
|
||||
#endif /* OPENSSH_SNTRUP761X25519_SHA512_OPENSSH_COM */
|
||||
|
||||
#ifdef OPENSSH_SNTRUP761X25519_SHA512
|
||||
static void
|
||||
torture_override_ecdh_sntrup761x25519_sha512(void **state)
|
||||
{
|
||||
struct torture_state *s = *state;
|
||||
bool internal_curve25519_called;
|
||||
bool internal_sntrup761_called;
|
||||
|
||||
if (ssh_fips_mode()) {
|
||||
skip();
|
||||
}
|
||||
|
||||
test_algorithm(s->ssh.session,
|
||||
"sntrup761x25519-sha512",
|
||||
NULL, /* cipher */
|
||||
NULL /* hostkey */);
|
||||
|
||||
internal_curve25519_called = internal_curve25519_function_called();
|
||||
internal_sntrup761_called = internal_sntrup761_function_called();
|
||||
|
||||
#if SHOULD_CALL_INTERNAL_SNTRUP761
|
||||
assert_true(internal_sntrup761_called);
|
||||
#else
|
||||
assert_false(internal_sntrup761_called);
|
||||
#endif
|
||||
|
||||
#if SHOULD_CALL_INTERNAL_CURVE25519
|
||||
assert_true(internal_curve25519_called);
|
||||
#else
|
||||
assert_false(internal_curve25519_called);
|
||||
#endif
|
||||
}
|
||||
#endif /* OPENSSH_SNTRUP761X25519_SHA512 */
|
||||
|
||||
#ifdef OPENSSH_SSH_ED25519
|
||||
static void torture_override_ed25519(void **state)
|
||||
{
|
||||
@@ -339,6 +373,11 @@ int torture_run_tests(void)
|
||||
session_setup,
|
||||
session_teardown),
|
||||
#endif /* OPENSSH_SNTRUP761X25519_SHA512_OPENSSH_COM */
|
||||
#ifdef OPENSSH_SNTRUP761X25519_SHA512
|
||||
cmocka_unit_test_setup_teardown(torture_override_ecdh_sntrup761x25519_sha512,
|
||||
session_setup,
|
||||
session_teardown),
|
||||
#endif /* OPENSSH_SNTRUP761X25519_SHA512 */
|
||||
#ifdef OPENSSH_SSH_ED25519
|
||||
cmocka_unit_test_setup_teardown(torture_override_ed25519,
|
||||
session_setup,
|
||||
|
||||
Reference in New Issue
Block a user