diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-12 04:45:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-12 04:45:08 +0000 |
commit | 3ade2b375d3e928a06a39bb5ce48e59ea054f9c8 (patch) | |
tree | 23c9115f88363ed22bc4afbeb4901994d036f189 /tests/libdnssec | |
parent | Releasing progress-linux version 3.3.9-1~progress7.99u1. (diff) | |
download | knot-3ade2b375d3e928a06a39bb5ce48e59ea054f9c8.tar.xz knot-3ade2b375d3e928a06a39bb5ce48e59ea054f9c8.zip |
Merging upstream version 3.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/libdnssec')
-rw-r--r-- | tests/libdnssec/test_key.c | 2 | ||||
-rw-r--r-- | tests/libdnssec/test_key_algorithm.c | 6 | ||||
-rw-r--r-- | tests/libdnssec/test_key_ds.c | 4 | ||||
-rw-r--r-- | tests/libdnssec/test_sign.c | 8 |
4 files changed, 3 insertions, 17 deletions
diff --git a/tests/libdnssec/test_key.c b/tests/libdnssec/test_key.c index 4f05405..effbe1a 100644 --- a/tests/libdnssec/test_key.c +++ b/tests/libdnssec/test_key.c @@ -192,9 +192,7 @@ int main(void) static const keyinfo_t keys[] = { { "RSA", &SAMPLE_RSA_KEY }, { "ECDSA", &SAMPLE_ECDSA_KEY }, -#ifdef HAVE_ED25519 { "ED25519", &SAMPLE_ED25519_KEY }, -#endif #ifdef HAVE_ED448 { "ED448", &SAMPLE_ED448_KEY }, #endif diff --git a/tests/libdnssec/test_key_algorithm.c b/tests/libdnssec/test_key_algorithm.c index 6c62106..75eace7 100644 --- a/tests/libdnssec/test_key_algorithm.c +++ b/tests/libdnssec/test_key_algorithm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> +/* Copyright (C) 2023 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -59,9 +59,7 @@ static void check_defaults(void) { is_int(2048, dnssec_algorithm_key_size_default(DNSSEC_KEY_ALGORITHM_RSA_SHA1_NSEC3), "rsa default"); is_int(256, dnssec_algorithm_key_size_default(DNSSEC_KEY_ALGORITHM_ECDSA_P256_SHA256), "ecc default"); -#ifdef HAVE_ED25519 is_int(256, dnssec_algorithm_key_size_default(DNSSEC_KEY_ALGORITHM_ED25519), "ed25519 default"); -#endif #ifdef HAVE_ED448 is_int(456, dnssec_algorithm_key_size_default(DNSSEC_KEY_ALGORITHM_ED448), "ed448 default"); #endif @@ -74,9 +72,7 @@ int main(void) // ranges ok_range(DNSSEC_KEY_ALGORITHM_RSA_SHA512, 1024, 4096, "RSA/SHA256"); ok_range(DNSSEC_KEY_ALGORITHM_ECDSA_P384_SHA384, 384, 384, "ECDSA/SHA384"); -#ifdef HAVE_ED25519 ok_range(DNSSEC_KEY_ALGORITHM_ED25519, 256, 256, "ED25519"); -#endif #ifdef HAVE_ED448 ok_range(DNSSEC_KEY_ALGORITHM_ED448, 456, 456, "ED448"); #endif diff --git a/tests/libdnssec/test_key_ds.c b/tests/libdnssec/test_key_ds.c index 29acf05..e076243 100644 --- a/tests/libdnssec/test_key_ds.c +++ b/tests/libdnssec/test_key_ds.c @@ -101,17 +101,13 @@ int main(int argc, char *argv[]) test_key("RSA", &SAMPLE_RSA_KEY); test_key("ECDSA", &SAMPLE_ECDSA_KEY); -#ifdef HAVE_ED25519 test_key("ED25519", &SAMPLE_ED25519_KEY); -#endif #ifdef HAVE_ED448 test_key("ED448", &SAMPLE_ED448_KEY); #endif test_errors(&SAMPLE_ECDSA_KEY); -#ifdef HAVE_ED25519 test_errors(&SAMPLE_ED25519_KEY); -#endif #ifdef HAVE_ED448 test_errors(&SAMPLE_ED448_KEY); #endif diff --git a/tests/libdnssec/test_sign.c b/tests/libdnssec/test_sign.c index bdb19fb..933206f 100644 --- a/tests/libdnssec/test_sign.c +++ b/tests/libdnssec/test_sign.c @@ -57,7 +57,6 @@ static const dnssec_binary_t signed_ecdsa = { .size = 64, .data = (uint8_t []) { 0xad, 0x2f, }}; -#ifdef HAVE_ED25519 static const dnssec_binary_t signed_ed25519 = { .size = 64, .data = (uint8_t []) { 0x0a, 0x9e, 0x51, 0x5f, 0x16, 0x89, 0x49, 0x27, 0x0e, 0x98, 0x34, 0xd3, 0x48, 0xef, 0x5a, 0x6e, @@ -67,8 +66,7 @@ static const dnssec_binary_t signed_ed25519 = { .size = 64, .data = (uint8_t []) 0x1d, 0x08, 0x10, 0x20, 0x1c, 0x01, 0x77, 0x1b, 0x5a, 0x48, 0xd6, 0xe5, 0x1c, 0xf9, 0xe3, 0xe0, 0x70, 0x34, 0x5e, 0x02, 0x49, 0xfb, 0x9e, 0x05, - }}; -#endif +}}; #ifdef HAVE_ED448 static const dnssec_binary_t signed_ed448 = { .size = 114, .data = (uint8_t []) { @@ -82,7 +80,7 @@ static const dnssec_binary_t signed_ed448 = { .size = 114, .data = (uint8_t []) 0xe9, 0xb9, 0x76, 0xb8, 0xa6, 0xa9, 0x0a, 0x4f, 0x18, 0xe1, 0x62, 0x27, 0x74, 0x99, 0x01, 0x98, 0x5f, 0xdb, 0xea, 0xdf, 0xab, 0x59, 0x6c, 0x79, 0xe2, 0xc2, 0x2a, 0x91, 0x29, 0x00 - }}; +}}; #endif static dnssec_binary_t binary_set_string(char *str) @@ -188,10 +186,8 @@ int main(void) check_key(&SAMPLE_RSA_KEY, &input_data, &signed_rsa, true); diag("ECDSA signing"); check_key(&SAMPLE_ECDSA_KEY, &input_data, &signed_ecdsa, false); -#ifdef HAVE_ED25519 diag("ED25519 signing"); check_key(&SAMPLE_ED25519_KEY, &input_data, &signed_ed25519, true); -#endif #ifdef HAVE_ED448 diag("ED448 signing"); check_key(&SAMPLE_ED448_KEY, &input_data, &signed_ed448, true); |