Lines Matching refs:digest

346   unsigned char digest[MD5_DIGEST_LEN];  in Curl_auth_create_digest_md5_message()  local
403 Curl_MD5_final(ctxt, digest); in Curl_auth_create_digest_md5_message()
409 Curl_MD5_update(ctxt, (const unsigned char *) digest, MD5_DIGEST_LEN); in Curl_auth_create_digest_md5_message()
416 Curl_MD5_final(ctxt, digest); in Curl_auth_create_digest_md5_message()
420 msnprintf(&HA1_hex[2 * i], 3, "%02x", digest[i]); in Curl_auth_create_digest_md5_message()
440 Curl_MD5_final(ctxt, digest); in Curl_auth_create_digest_md5_message()
443 msnprintf(&HA2_hex[2 * i], 3, "%02x", digest[i]); in Curl_auth_create_digest_md5_message()
470 Curl_MD5_final(ctxt, digest); in Curl_auth_create_digest_md5_message()
473 msnprintf(&resp_hash_hex[2 * i], 3, "%02x", digest[i]); in Curl_auth_create_digest_md5_message()
504 struct digestdata *digest) in Curl_auth_decode_digest_http_message() argument
513 if(digest->nonce) in Curl_auth_decode_digest_http_message()
517 Curl_auth_digest_cleanup(digest); in Curl_auth_decode_digest_http_message()
530 free(digest->nonce); in Curl_auth_decode_digest_http_message()
531 digest->nonce = strdup(content); in Curl_auth_decode_digest_http_message()
532 if(!digest->nonce) in Curl_auth_decode_digest_http_message()
537 digest->stale = TRUE; in Curl_auth_decode_digest_http_message()
538 digest->nc = 1; /* we make a new nonce now */ in Curl_auth_decode_digest_http_message()
542 free(digest->realm); in Curl_auth_decode_digest_http_message()
543 digest->realm = strdup(content); in Curl_auth_decode_digest_http_message()
544 if(!digest->realm) in Curl_auth_decode_digest_http_message()
548 free(digest->opaque); in Curl_auth_decode_digest_http_message()
549 digest->opaque = strdup(content); in Curl_auth_decode_digest_http_message()
550 if(!digest->opaque) in Curl_auth_decode_digest_http_message()
579 free(digest->qop); in Curl_auth_decode_digest_http_message()
580 digest->qop = strdup(DIGEST_QOP_VALUE_STRING_AUTH); in Curl_auth_decode_digest_http_message()
581 if(!digest->qop) in Curl_auth_decode_digest_http_message()
585 free(digest->qop); in Curl_auth_decode_digest_http_message()
586 digest->qop = strdup(DIGEST_QOP_VALUE_STRING_AUTH_INT); in Curl_auth_decode_digest_http_message()
587 if(!digest->qop) in Curl_auth_decode_digest_http_message()
592 free(digest->algorithm); in Curl_auth_decode_digest_http_message()
593 digest->algorithm = strdup(content); in Curl_auth_decode_digest_http_message()
594 if(!digest->algorithm) in Curl_auth_decode_digest_http_message()
598 digest->algo = ALGO_MD5SESS; in Curl_auth_decode_digest_http_message()
600 digest->algo = ALGO_MD5; in Curl_auth_decode_digest_http_message()
602 digest->algo = ALGO_SHA256; in Curl_auth_decode_digest_http_message()
604 digest->algo = ALGO_SHA256SESS; in Curl_auth_decode_digest_http_message()
607 digest->algo = ALGO_SHA512_256; in Curl_auth_decode_digest_http_message()
614 digest->algo = ALGO_SHA512_256SESS; in Curl_auth_decode_digest_http_message()
624 digest->userhash = TRUE; in Curl_auth_decode_digest_http_message()
646 if(before && !digest->stale) in Curl_auth_decode_digest_http_message()
650 if(!digest->nonce) in Curl_auth_decode_digest_http_message()
654 if(!digest->qop && (digest->algo & SESSION_ALGO)) in Curl_auth_decode_digest_http_message()
686 struct digestdata *digest, in auth_create_digest_http_message() argument
708 if(!digest->nc) in auth_create_digest_http_message()
709 digest->nc = 1; in auth_create_digest_http_message()
711 if(!digest->cnonce) { in auth_create_digest_http_message()
723 digest->cnonce = cnonce; in auth_create_digest_http_message()
726 if(digest->userhash) { in auth_create_digest_http_message()
727 hashthis = aprintf("%s:%s", userp, digest->realm ? digest->realm : ""); in auth_create_digest_http_message()
749 hashthis = aprintf("%s:%s:%s", userp, digest->realm ? digest->realm : "", in auth_create_digest_http_message()
760 if(digest->algo & SESSION_ALGO) { in auth_create_digest_http_message()
762 tmp = aprintf("%s:%s:%s", ha1, digest->nonce, digest->cnonce); in auth_create_digest_http_message()
790 if(digest->qop && strcasecompare(digest->qop, "auth-int")) { in auth_create_digest_http_message()
816 if(digest->qop) { in auth_create_digest_http_message()
817 hashthis = aprintf("%s:%s:%08x:%s:%s:%s", ha1, digest->nonce, digest->nc, in auth_create_digest_http_message()
818 digest->cnonce, digest->qop, ha2); in auth_create_digest_http_message()
821 hashthis = aprintf("%s:%s:%s", ha1, digest->nonce, ha2); in auth_create_digest_http_message()
846 userp_quoted = auth_digest_string_quoted(digest->userhash ? userh : userp); in auth_create_digest_http_message()
849 if(digest->realm) in auth_create_digest_http_message()
850 realm_quoted = auth_digest_string_quoted(digest->realm); in auth_create_digest_http_message()
860 nonce_quoted = auth_digest_string_quoted(digest->nonce); in auth_create_digest_http_message()
867 if(digest->qop) { in auth_create_digest_http_message()
880 digest->cnonce, in auth_create_digest_http_message()
881 digest->nc, in auth_create_digest_http_message()
882 digest->qop, in auth_create_digest_http_message()
886 digest->nc++; in auth_create_digest_http_message()
907 if(digest->opaque) { in auth_create_digest_http_message()
910 opaque_quoted = auth_digest_string_quoted(digest->opaque); in auth_create_digest_http_message()
924 if(digest->algorithm) { in auth_create_digest_http_message()
926 tmp = aprintf("%s, algorithm=%s", response, digest->algorithm); in auth_create_digest_http_message()
934 if(digest->userhash) { in auth_create_digest_http_message()
976 struct digestdata *digest, in Curl_auth_create_digest_http_message() argument
979 if(digest->algo <= ALGO_MD5SESS) in Curl_auth_create_digest_http_message()
981 request, uripath, digest, in Curl_auth_create_digest_http_message()
986 if(digest->algo <= ALGO_SHA256SESS) in Curl_auth_create_digest_http_message()
988 request, uripath, digest, in Curl_auth_create_digest_http_message()
993 if(digest->algo <= ALGO_SHA512_256SESS) in Curl_auth_create_digest_http_message()
995 request, uripath, digest, in Curl_auth_create_digest_http_message()
1015 void Curl_auth_digest_cleanup(struct digestdata *digest) in Curl_auth_digest_cleanup() argument
1017 Curl_safefree(digest->nonce); in Curl_auth_digest_cleanup()
1018 Curl_safefree(digest->cnonce); in Curl_auth_digest_cleanup()
1019 Curl_safefree(digest->realm); in Curl_auth_digest_cleanup()
1020 Curl_safefree(digest->opaque); in Curl_auth_digest_cleanup()
1021 Curl_safefree(digest->qop); in Curl_auth_digest_cleanup()
1022 Curl_safefree(digest->algorithm); in Curl_auth_digest_cleanup()
1024 digest->nc = 0; in Curl_auth_digest_cleanup()
1025 digest->algo = ALGO_MD5; /* default algorithm */ in Curl_auth_digest_cleanup()
1026 digest->stale = FALSE; /* default means normal, not stale */ in Curl_auth_digest_cleanup()
1027 digest->userhash = FALSE; in Curl_auth_digest_cleanup()