From: Jay Satiro Date: Wed, 13 Feb 2019 00:54:08 +0000 (-0500) Subject: schannel: restore some debug output but only for debug builds X-Git-Tag: curl-7_64_1~150 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=06480704238105bebf696e1f0f49b11c65a30b6f;p=curl schannel: restore some debug output but only for debug builds Follow-up to 84c10dc from earlier today which wrapped a lot of the noisy debug output in DEBUGF but omitted a few lines. Ref: https://github.com/curl/curl/commit/84c10dc#r32292900 --- diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index 8ae15baf9..6f55b3b8f 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -1627,6 +1627,7 @@ schannel_recv(struct connectdata *conn, int sockindex, * handled in the cleanup. */ + DEBUGF(infof(data, "schannel: client wants to read %zu bytes\n", len)); *err = CURLE_OK; if(len && len <= BACKEND->decdata_offset) { @@ -1687,7 +1688,8 @@ schannel_recv(struct connectdata *conn, int sockindex, if(*err) { nread = -1; if(*err == CURLE_AGAIN) - ; + DEBUGF(infof(data, + "schannel: Curl_read_plain returned CURLE_AGAIN\n")); else if(*err == CURLE_RECV_ERROR) infof(data, "schannel: Curl_read_plain returned CURLE_RECV_ERROR\n"); else @@ -1734,6 +1736,8 @@ schannel_recv(struct connectdata *conn, int sockindex, /* check for successfully decrypted data, even before actual renegotiation or shutdown of the connection context */ if(inbuf[1].BufferType == SECBUFFER_DATA) { + DEBUGF(infof(data, "schannel: decrypted data length: %lu\n", + inbuf[1].cbBuffer)); /* increase buffer in order to fit the received amount of data */ size = inbuf[1].cbBuffer > CURL_SCHANNEL_BUFFER_FREE_SIZE ? @@ -2040,6 +2044,7 @@ static int Curl_schannel_shutdown(struct connectdata *conn, int sockindex) /* free SSPI Schannel API security context handle */ if(BACKEND->ctxt) { + DEBUGF(infof(data, "schannel: clear security context handle\n")); s_pSecFn->DeleteSecurityContext(&BACKEND->ctxt->ctxt_handle); Curl_safefree(BACKEND->ctxt); }