mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-12 03:00:26 +09:00
Enable HMAC SHA1 tests for dropbear <2025.87
Signed-off-by: abdallah elhdad <abdallahselhdad@gmail.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit c17112f070)
This commit is contained in:
committed by
Jakub Jelen
parent
33be8038fe
commit
c8c3d418ee
@@ -410,20 +410,26 @@ static int torture_pkd_setup_ecdsa_521(void **state) {
|
||||
f(client, ecdsa_521_aes192_ctr, ciphercmd("aes192-ctr"), setup_ecdsa_521, teardown)
|
||||
|
||||
|
||||
#define PKDTESTS_MAC_FIPS(f, client, maccmd) \
|
||||
#define PKDTESTS_MAC_FIPS_BASE(f, client, maccmd) \
|
||||
f(client, ecdsa_256_hmac_sha2_256, maccmd("hmac-sha2-256"), setup_ecdsa_256, teardown) \
|
||||
f(client, ecdsa_384_hmac_sha2_256, maccmd("hmac-sha2-256"), setup_ecdsa_384, teardown) \
|
||||
f(client, ecdsa_521_hmac_sha2_256, maccmd("hmac-sha2-256"), setup_ecdsa_521, teardown) \
|
||||
f(client, rsa_hmac_sha2_256, maccmd("hmac-sha2-256"), setup_rsa, teardown)
|
||||
|
||||
/* TODO: Include these tests when an older version of dropbear is used. Currently, they have been removed as the latest dropbear version
|
||||
does not support these MACs.
|
||||
#define PKDTESTS_MAC_FIPS_SHA1(f, client, maccmd) \
|
||||
f(client, ecdsa_256_hmac_sha1, maccmd("hmac-sha1"), setup_ecdsa_256, teardown) \
|
||||
f(client, ecdsa_384_hmac_sha1, maccmd("hmac-sha1"), setup_ecdsa_384, teardown) \
|
||||
f(client, ecdsa_521_hmac_sha1, maccmd("hmac-sha1"), setup_ecdsa_521, teardown) \
|
||||
f(client, rsa_hmac_sha1, maccmd("hmac-sha1"), setup_rsa, teardown)
|
||||
|
||||
f(client, ecdsa_256_hmac_sha1, maccmd("hmac-sha1"), setup_ecdsa_256, teardown) \
|
||||
f(client, ecdsa_384_hmac_sha1, maccmd("hmac-sha1"), setup_ecdsa_384, teardown) \
|
||||
f(client, ecdsa_521_hmac_sha1, maccmd("hmac-sha1"), setup_ecdsa_521, teardown) \
|
||||
f(client, rsa_hmac_sha1, maccmd("hmac-sha1"), setup_rsa, teardown) \
|
||||
*/
|
||||
#ifdef DROPBEAR_SUPPORTS_HMAC_SHA1
|
||||
#define PKDTESTS_MAC_FIPS(f, client, maccmd) \
|
||||
PKDTESTS_MAC_FIPS_BASE(f, client, maccmd) \
|
||||
PKDTESTS_MAC_FIPS_SHA1(f, client, maccmd)
|
||||
#else
|
||||
#define PKDTESTS_MAC_FIPS(f, client, maccmd) \
|
||||
PKDTESTS_MAC_FIPS_BASE(f, client, maccmd)
|
||||
#endif
|
||||
|
||||
#define PKDTESTS_MAC_OPENSSHONLY_FIPS(f, client, maccmd) \
|
||||
f(client, ecdsa_256_hmac_sha1_etm, maccmd("hmac-sha1-etm@openssh.com"), setup_ecdsa_256, teardown) \
|
||||
|
||||
Reference in New Issue
Block a user