diff options
author | Michael R Sweet <michaelrsweet@gmail.com> | 2017-11-06 16:19:27 -0500 |
---|---|---|
committer | Michael R Sweet <michaelrsweet@gmail.com> | 2017-11-06 16:28:31 -0500 |
commit | 7ec11630684301572cb7d19a95c244c104961a2a (patch) | |
tree | 75940c5fb6da6293797bae904c7865433ead08e7 /cups/http-support.c | |
parent | 054eee9cd0555f836ef9ad87f21d6e6ace1d47f1 (diff) | |
download | cups-7ec11630684301572cb7d19a95c244c104961a2a.tar.gz |
Support the latest HTTP Digest authentication specification (Issue #4862)
Also deprecates all httpMD5* functions.
- cgi-bin/var.c: Use cupsHashData to compute SID hash.
- cups/auth.c: Rewrite WWW-Authenticate parser to support multiple auth schemes
and the new RFC 7616 version of HTTP Digest.
- cups/cups.h: Add cupsHashString function to get a hex version of a hash.
- cups/hash.c: Add MD5 support.
- cups/http.c: Track WWW-Authenticate in a long string, concatenate new set
values.
- cups/http.h: Deprecate httpMD5* and recommend cupsDoAuth and cupsHash*.
- cups/http-private.h: Pull MD5 stuff, nonce_count is unsigned, track
WWW-Authenticate header as a potentially long string.
- cups/http-support.c: Use cupsHashData to compute UUID hash.
- cups/md5.c: Comment everything out if we have an OS-supplied MD5 hash
function.
- cups/md5passwd.c: Use cupsHash* functions.
- cups/tls-*.c: Use cupsHash* functions.
- cups/versioning.h: Add CUPS_API_2_3 definition.
- scheduler/client.c: Update WWW-Authenticate header to include AuthRef,
Local, and PeerCred schemes with parameters as needed.
Diffstat (limited to 'cups/http-support.c')
-rw-r--r-- | cups/http-support.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cups/http-support.c b/cups/http-support.c index 76dbb7dbf..e2565392f 100644 --- a/cups/http-support.c +++ b/cups/http-support.c @@ -502,7 +502,6 @@ httpAssembleUUID(const char *server, /* I - Server name */ size_t bufsize) /* I - Size of buffer */ { char data[1024]; /* Source string for MD5 */ - _cups_md5_state_t md5state; /* MD5 state */ unsigned char md5sum[16]; /* MD5 digest/sum */ @@ -517,9 +516,7 @@ httpAssembleUUID(const char *server, /* I - Server name */ port, name ? name : server, number, (unsigned)CUPS_RAND() & 0xffff, (unsigned)CUPS_RAND() & 0xffff); - _cupsMD5Init(&md5state); - _cupsMD5Append(&md5state, (unsigned char *)data, (int)strlen(data)); - _cupsMD5Finish(&md5state, md5sum); + cupsHashData("md5", (unsigned char *)data, strlen(data), md5sum, sizeof(md5sum)); /* * Generate the UUID from the MD5... |