Skip to content

schannel, rework info messages and tracing - #14810

Closed
icing wants to merge 4 commits into
curl:masterfrom
icing:schannel-tracing
Closed

icing wants to merge 4 commits into
curl:masterfrom
icing:schannel-tracing

Conversation

@icing

@icing icing commented Sep 6, 2024

Copy link
Copy Markdown
Contributor

Turn most infof() and DEBUGF() traces into CURL_TRC_CF() statements that do not appear on normal verbose output.

refs #14807

Turn most infof() and DEBUGF() traces into CURL_TRC_CF() statements
that do not appear on normal verbose output.

refs curl#14807
@github-actions github-actions Bot added TLS Windows Windows-specific labels Sep 6, 2024
Comment thread lib/vtls/schannel.c Resolved
@jay

jay commented Sep 6, 2024

Copy link
Copy Markdown
Member

I disagree. Most of these are normal for verbose output such as renegotiation failed or disabled revocation checks. The issue with tracing is it outputs a lot of data in the curl tool, even if you only select ssl, like I just tried tracing a 200MB file with schannel ssl tracing and it dumped a slew of data on the screen It makes it harder for me to identify what is actually going on with schannel as opposed to verbose.

I agree some are appropriate for trace output like the encrypted/decrypted data messages, or connect stage messages would work well there. example (taken from this pr)

12:39:39.333003 [0-0] == Info: [SSL] encrypted data length: 3668
12:39:39.335864 [0-0] == Info: [SSL] encrypted cached: offset 3668 length 103424
12:39:39.339958 [0-0] == Info: [SSL] decrypted data length: 1383
12:39:39.342663 [0-0] == Info: [SSL] decrypted data added: 1383
12:39:39.345412 [0-0] == Info: [SSL] decrypted cached: offset 2766 length 102400

The "failed to decrypt data, need more data" in that other issue is correct. It failed to decrypt data because the message is incomplete. I'd prefer to keep that in trace.

I am going to propose an alternate pr for this dialed back some

@icing

icing commented Sep 6, 2024

Copy link
Copy Markdown
Contributor Author

Please do. I tried to filter a bit between fail/informative/debugging classifications, but you have more experience here.

@bagder

bagder commented Sep 6, 2024

Copy link
Copy Markdown
Member

The "failed to decrypt data, need more data" in that other issue is correct. It failed to decrypt data because the message is incomplete. I'd prefer to keep that in trace.

Why? We don't log every EAGAIN situation internally since it is a quite expected condition and it makes it sound like it is a problem - no to mention that it can get repeated quite a number of times without it being any problem. I recommend you set it in within a DEBUGF() or something.

@jay

jay commented Sep 8, 2024

Copy link
Copy Markdown
Member

Rather than classify the extra-verbose messages as trace I separated them into a separate macro that can be enabled at build time. This way they do not add a lot of noise to debug builds unless built for it, since the messages are useful only when debugging schannel_recv. Also I changed the eagain messages to extra verbose. #14826

@icing

icing commented Oct 21, 2024

Copy link
Copy Markdown
Contributor Author

Replaced by #14826

@icing icing closed this Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TLS Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

3 participants