mirror of
https://github.com/curl/curl.git
synced 2026-07-25 02:37:18 +03:00
digest: fix build with disabled digest auth
Fix building with `--disable-digest-auth`. Make test cases run in such a build. Add such a build to our CI jobs. Reported-by: Tristan Perrault Fixes #17612 Closes #17614
This commit is contained in:
parent
66d35ee5d4
commit
984c96e307
78 changed files with 85 additions and 2 deletions
4
.github/workflows/linux.yml
vendored
4
.github/workflows/linux.yml
vendored
|
|
@ -177,8 +177,8 @@ jobs:
|
|||
install_steps: skipall
|
||||
generate: -DCURL_USE_OPENSSL=ON -DCURL_USE_GSSAPI=ON -DENABLE_DEBUG=ON -DCURL_LTO=ON
|
||||
|
||||
- name: openssl !ipv6 !--libcurl
|
||||
configure: --with-openssl --disable-ipv6 --enable-debug --disable-unity --disable-libcurl-option
|
||||
- name: openssl !ipv6 !--libcurl !--digest-auth
|
||||
configure: --with-openssl --disable-ipv6 --enable-debug --disable-unity --disable-libcurl-option --disable-digest-auth
|
||||
|
||||
- name: openssl https-only
|
||||
configure: >-
|
||||
|
|
|
|||
|
|
@ -116,6 +116,8 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data,
|
|||
|
||||
/* This is used to clean up the digest specific data */
|
||||
void Curl_auth_digest_cleanup(struct digestdata *digest);
|
||||
#else
|
||||
#define Curl_auth_is_digest_supported() FALSE
|
||||
#endif /* !CURL_DISABLE_DIGEST_AUTH */
|
||||
|
||||
#ifdef USE_GSASL
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ http
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP POST --digest with PUT and resumed upload and modified method
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ http
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP PUT with Digest auth, resumed upload and modified method, twice
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP PUT with --anyauth authorization (picking Digest)
|
||||
|
|
|
|||
|
|
@ -870,6 +870,7 @@ http
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP proxy CONNECT auth Digest, large headers and data
|
||||
|
|
|
|||
|
|
@ -875,6 +875,7 @@ http
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP proxy CONNECT auth Digest, large headers and chunked data
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
Downgraded HTTP PUT to HTTP 1.0 with authorization
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP retry after closed connection and empty response
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with Digest and realm with quoted quotes
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with Digest authorization with user name needing escape
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP POST --digest with user-specified Content-Length header
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP PUT --digest with user-specified Content-Length header
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ http
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP GET --digest increasing nonce-count
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP GET with --anyauth with two URLs (picking Digest)
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with --anyauth and connection reuse
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with duplicated WWW-Authenticate parameters
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with Digest authorization with stale=true
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP PUT with --anyauth authorization (picking Digest)
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with Digest authorization on custom CURLOPT_PORT
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ http
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with proxy-requiring-Basic to site-requiring-Digest
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ http
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with proxy-requiring-Digest to site-requiring-Digest
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ NTLM
|
|||
SSL
|
||||
!SSPI
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with proxy-requiring-NTLM to site-requiring-Digest
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ http
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP POST --digest to server not requiring any auth at all
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ http
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP POST --digest to server doing a 302-location response
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<tool>
|
||||
lib2023
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<tool>
|
||||
lib2023
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<tool>
|
||||
lib2023
|
||||
|
|
|
|||
|
|
@ -234,6 +234,7 @@ Finally, this is the real page!
|
|||
NTLM
|
||||
SSL
|
||||
!SSPI
|
||||
digest
|
||||
</features>
|
||||
<server>
|
||||
http
|
||||
|
|
|
|||
|
|
@ -223,6 +223,7 @@ Finally, this is the real page!
|
|||
NTLM
|
||||
SSL
|
||||
!SSPI
|
||||
digest
|
||||
</features>
|
||||
<server>
|
||||
http
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ http
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP POST --digest with PUT, resumed upload, modified method and SHA-256
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ http
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP POST --digest with PUT, resumed upload, modified method, SHA-256 and userhash=true
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ http
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP proxy CONNECT auth Digest
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with RFC7616 SHA256 Digest authorization
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with RFC7616 SHA-256 Digest authorization and userhash=true
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with RFC7616 Digest authorization with bad password and SHA256
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with RFC7616 Digest authorization with bad password, SHA-256 and userhash=true
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP POST --digest with SHA256 and user-specified Content-Length header
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP POST --digest with SHA-256, userhash=true and user-specified Content-Length header
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with digest auth and URI contains query
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP POST --digest
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP POST --digest with server doing a 100 before 401 response
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ Mime
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP POST multipart without Expect: header using proxy anyauth (Digest)
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ Mime
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP POST multipart with Expect: header using proxy anyauth (Digest)
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with two Digest authorization headers
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ http
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with proxy Digest and site Digest with creds in URLs
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with Digest and multiple qop values with leading space
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ lib%TESTNUMBER
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP proxy auth Digest multi API re-using connection
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ lib547
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP proxy auth Digest with POST data from read callback
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ lib%TESTNUMBER
|
|||
!SSPI
|
||||
crypto
|
||||
proxy
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP proxy auth Digest with 70K POST data from read callback
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
# tool is what to use instead of 'curl'
|
||||
<tool>
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ http
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
# tool is what to use instead of 'curl'
|
||||
<tool>
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with Digest authorization
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with Digest authorization with bad password
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ This IS the real page!
|
|||
<features>
|
||||
!SSPI
|
||||
NTLM
|
||||
digest
|
||||
</features>
|
||||
<server>
|
||||
http
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP with Digest *OR* Basic authorization
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ imap
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
IMAP CRAM-MD5 authentication
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ imap
|
|||
!SSPI
|
||||
Debug
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
IMAP DIGEST-MD5 authentication
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ imap
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
IMAP CRAM-MD5 graceful cancellation
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ imap
|
|||
!SSPI
|
||||
Debug
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
IMAP DIGEST-MD5 graceful cancellation
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ imap
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
IMAP CRAM-MD5 authentication with SASL downgrade
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ imap
|
|||
!SSPI
|
||||
Debug
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
IMAP DIGEST-MD5 authentication with SASL downgrade
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ pop3
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
POP3 APOP authentication
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ pop3
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
POP3 CRAM-MD5 authentication
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ pop3
|
|||
!SSPI
|
||||
Debug
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
POP3 DIGEST-MD5 authentication
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ pop3
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
POP3 CRAM-MD5 graceful cancellation
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ pop3
|
|||
!SSPI
|
||||
Debug
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
POP3 DIGEST-MD5 graceful cancellation
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ pop3
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
POP3 CRAM-MD5 authentication with SASL downgrade
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ http
|
|||
<features>
|
||||
!SSPI
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
HTTP PUT with Digest authorization
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ pop3
|
|||
!SSPI
|
||||
Debug
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
POP3 DIGEST-MD5 authentication with SASL downgrade
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ pop3
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
POP3 with short authentication response
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ smtp
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
SMTP CRAM-MD5 authentication
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ smtp
|
|||
!SSPI
|
||||
Debug
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
SMTP DIGEST-MD5 authentication
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ smtp
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
SMTP CRAM-MD5 graceful cancellation
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ smtp
|
|||
!SSPI
|
||||
Debug
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
SMTP DIGEST-MD5 graceful cancellation
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ smtp
|
|||
</server>
|
||||
<features>
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
SMTP CRAM-MD5 authentication with SASL downgrade
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ smtp
|
|||
!SSPI
|
||||
Debug
|
||||
crypto
|
||||
digest
|
||||
</features>
|
||||
<name>
|
||||
SMTP DIGEST-MD5 authentication with SASL downgrade
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ class TestAuth:
|
|||
# download 1 file, authenticated
|
||||
@pytest.mark.parametrize("proto", ['http/1.1', 'h2', 'h3'])
|
||||
def test_14_02_digest_get_auth(self, env: Env, httpd, nghttpx, proto):
|
||||
if not env.curl_has_feature('digest'):
|
||||
pytest.skip("curl built without digest")
|
||||
if proto == 'h3' and not env.have_h3():
|
||||
pytest.skip("h3 not supported")
|
||||
curl = CurlClient(env=env)
|
||||
|
|
@ -65,6 +67,8 @@ class TestAuth:
|
|||
# PUT data, authenticated
|
||||
@pytest.mark.parametrize("proto", ['http/1.1', 'h2', 'h3'])
|
||||
def test_14_03_digest_put_auth(self, env: Env, httpd, nghttpx, proto):
|
||||
if not env.curl_has_feature('digest'):
|
||||
pytest.skip("curl built without digest")
|
||||
if proto == 'h3' and not env.have_h3():
|
||||
pytest.skip("h3 not supported")
|
||||
if proto == 'h3' and env.curl_uses_ossl_quic():
|
||||
|
|
@ -80,6 +84,8 @@ class TestAuth:
|
|||
# PUT data, digest auth large pw
|
||||
@pytest.mark.parametrize("proto", ['h2', 'h3'])
|
||||
def test_14_04_digest_large_pw(self, env: Env, httpd, nghttpx, proto):
|
||||
if not env.curl_has_feature('digest'):
|
||||
pytest.skip("curl built without digest")
|
||||
if proto == 'h3' and not env.have_h3():
|
||||
pytest.skip("h3 not supported")
|
||||
data='0123456789'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue