-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement SSL_CTX_set_msg_callback/SSL_set_msg_callback for ssl/tls record tracing #283
Merged
h-vn
merged 9 commits into
radiator-software:master
from
CowboyTim:implement-ssl-msg-callback
Aug 19, 2021
Merged
Implement SSL_CTX_set_msg_callback/SSL_set_msg_callback for ssl/tls record tracing #283
h-vn
merged 9 commits into
radiator-software:master
from
CowboyTim:implement-ssl-msg-callback
Aug 19, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ecord tracing - lib/Net/SSLeay.pod: update manpage - updated Changes - updated MANIFEST - t/local/46_msg_callback.t added
Not all openssl versions have the same "version" for the tls record protocol version.
The 3 things this sub needs to do: 1. not die 2. no memory leak (difficult to test) 3. provide information The validness of the buffer can be checked, so we use this as a validation instead. This selftest is not here to validate the protocol and the intricacies of the possible implementation or version (ssl3 vs tls1 etc).
A different openssl/protocol can't assume the same nr of records either. For now, all buffer length checks need to be ok and at least 2 records logged via SSL_CTX_msg_callback/SSL_msg_callback.
h-vn
reviewed
Aug 16, 2021
h-vn
reviewed
Aug 16, 2021
h-vn
reviewed
Aug 16, 2021
- point url to manmaster/man3 instead of just /ssl/ - fix SSL_CTX_set_msg_callback instead of CTX_SSL_set_msg_callback
h-vn
reviewed
Aug 17, 2021
h-vn
reviewed
Aug 17, 2021
h-vn
reviewed
Aug 17, 2021
…g_callback - use the same argument order as the doc in OpenSSL for the callback function sub { my ($write_p,$version,$content_type,$buffer,$len,$ssl,$data) = @_; ... } instead of: sub { my ($ssl,$write_p,$version,$content_type,$buffer,$len,$data) = @_; ... } - change the test so that it uses the callback data as a test - add a (verify simple) test for undef/unset the callback - add documentation that SSL_CTX_set_msg_callback_arg/SSL_set_msg_callback_arg aren't provided as the $arg/$data callback SV is handled automatically
To help with observing the messages in the callback function, future work could include:
Here's an example from Curl:
|
Thx! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for the msg callback functionality to do some debugging for e.g. tls handshake.