digest: support SHA-512/256

Also fix the tests. New implementation tested with GNU libmicrohttpd.
The new numbers in tests are real SHA-512/256 numbers (not just some
random ;) numbers ).
This commit is contained in:
Evgeny Grin 2024-02-08 10:31:12 +01:00 committed by Daniel Stenberg
parent 6d6113e122
commit e3461bbd05
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 40 additions and 13 deletions

View file

@ -54,6 +54,7 @@ http
<features>
!SSPI
crypto
sha512-256
</features>
<name>
HTTP with RFC7616 Digest authorization with bad password, SHA-512-256 and userhash=false
@ -73,7 +74,7 @@ Accept: */*
GET /%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Authorization: Digest username="testuser", realm="testrealm", nonce="2053604145", uri="/%TESTNUMBER", response="5a5f20b0e601aeddc6f96422c2332d49ff431c49ab143b5f836ef76e9ac78f5e", algorithm=SHA-512-256
Authorization: Digest username="testuser", realm="testrealm", nonce="2053604145", uri="/%TESTNUMBER", response="0373a49d7d352ff54884faaf762fc6c89281b4112ad8fcbbe1d1ee52dcf7a802", algorithm=SHA-512-256
User-Agent: curl/%VERSION
Accept: */*