Skip to content

Commit

Permalink
TLS fix ecdsa fingerprint
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hadinger authored Dec 16, 2024
1 parent 2c3785c commit 97b375f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/lib_ssl/tls_mini/src/WiFiClientSecureLightBearSSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 97b375f

Please sign in to comment.