diff --git a/README.md b/README.md index d6cae485b..bdd8747be 100644 --- a/README.md +++ b/README.md @@ -1044,7 +1044,7 @@ Optionally included keys are: * `DTLS-fingerprint` Contains a string and is used to select the hashing function to generate the DTLS fingerprint - from the certificate. The default is SHA-1, or the same hashing function as was used by the + from the certificate. The default is SHA-256, or the same hashing function as was used by the peer. Available are `SHA-1`, `SHA-224`, `SHA-256`, `SHA-384`, and `SHA-512`. * `SDES` diff --git a/daemon/dtls.c b/daemon/dtls.c index 685651d16..b080a9cc9 100644 --- a/daemon/dtls.c +++ b/daemon/dtls.c @@ -67,6 +67,11 @@ static unsigned int sha_512_func(unsigned char *, X509 *); static const struct dtls_hash_func hash_funcs[] = { + { + .name = "sha-256", + .num_bytes = 256 / 8, + .__func = sha_256_func, + }, { .name = "sha-1", .num_bytes = 160 / 8, @@ -77,11 +82,6 @@ static const struct dtls_hash_func hash_funcs[] = { .num_bytes = 224 / 8, .__func = sha_224_func, }, - { - .name = "sha-256", - .num_bytes = 256 / 8, - .__func = sha_256_func, - }, { .name = "sha-384", .num_bytes = 384 / 8, diff --git a/t/auto-daemon-tests-reorder.pl b/t/auto-daemon-tests-reorder.pl index d659ee31e..ca612882a 100755 --- a/t/auto-daemon-tests-reorder.pl +++ b/t/auto-daemon-tests-reorder.pl @@ -3663,115 +3663,6 @@ SDP -new_call; - -offer('fingerprint selection', { - ICE => 'remove', - flags => [], - 'transport-protocol' => 'RTP/SAVP', - SDES => ['off'], - }, < 'remove', - flags => [], - 'transport-protocol' => 'RTP/SAVP', - SDES => ['off'], - 'DTLS-fingerprint' => 'SHA-256', - }, < 'remove', - flags => [], - 'transport-protocol' => 'RTP/SAVP', - SDES => ['off'], - 'DTLS-fingerprint' => 'sha-256', - }, < [], 'transport-protocol' => 'RTP/SAVP', SDES => ['off'], - 'DTLS-fingerprint' => 'SHA-256', + 'DTLS-fingerprint' => 'SHA-1', }, < ft() }); @@ -3872,7 +3872,7 @@ a=crypto:10 F8_128_HMAC_SHA1_32 inline:CRYPTO128 a=crypto:11 NULL_HMAC_SHA1_80 inline:CRYPTO128 a=crypto:12 NULL_HMAC_SHA1_32 inline:CRYPTO128 a=setup:actpass -a=fingerprint:sha-1 FINGERPRINT +a=fingerprint:sha-256 FINGERPRINT256 SDP @@ -4451,7 +4451,7 @@ a=crypto:10 F8_128_HMAC_SHA1_32 inline:CRYPTO128 a=crypto:11 NULL_HMAC_SHA1_80 inline:CRYPTO128 a=crypto:12 NULL_HMAC_SHA1_32 inline:CRYPTO128 a=setup:actpass -a=fingerprint:sha-1 FINGERPRINT +a=fingerprint:sha-256 FINGERPRINT256 a=ptime:20 SDP @@ -4569,7 +4569,7 @@ a=crypto:10 F8_128_HMAC_SHA1_32 inline:CRYPTO128 a=crypto:11 NULL_HMAC_SHA1_80 inline:CRYPTO128 a=crypto:12 NULL_HMAC_SHA1_32 inline:CRYPTO128 a=setup:actpass -a=fingerprint:sha-1 FINGERPRINT +a=fingerprint:sha-256 FINGERPRINT256 a=ptime:20 SDP