TLS fix ecdsa fingerprint

This commit is contained in:
s-hadinger 2024-12-16 22:31:01 +01:00 committed by GitHub
parent 2c3785c1c6
commit 97b375fd57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -815,10 +815,9 @@ extern "C" {
// The tag string doesn't really matter, but it should differ depending on
// key type. For ECDSA it's a fixed string.
sha1_update_len(&shactx, "ecdsa", 5); // tag
int32_t curve = eckey.curve;
sha1_update_len(&shactx, &curve, 4); // curve id as int32
sha1_update_len(&shactx, "curve", 5); // tag2
sha1_update_len(&shactx, eckey.q, eckey.qlen); // exponent
int32_t curve = htonl(eckey.curve);
sha1_update_len(&shactx, &curve, 4); // curve id as int32be
sha1_update_len(&shactx, eckey.q, eckey.qlen); // public point
}
#endif
else {