Skip to content
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

Debugging and "plugin" callbacks #17

Open
jonkri opened this issue Aug 17, 2012 · 3 comments
Open

Debugging and "plugin" callbacks #17

jonkri opened this issue Aug 17, 2012 · 3 comments

Comments

@jonkri
Copy link

jonkri commented Aug 17, 2012

In an e-mail to me, Vincent suggested a system for "plugin" callbacks. This would enable users of hs-
tls to get otherwise hidden debugging information, such as handshake data, through the means of callback functions.

(I personally need the FinishedData value from Network/TLS/Struct.hs.)

@vincenthz
Copy link
Collaborator

i'm going to cleanup the hooks, but isn't loggingPacketRecv already enough for receiving FinishedData ? or is there any missing data from it ?

EDIT: actually no, it's the String of the packet. would be fiddly to get data from it.

@vincenthz
Copy link
Collaborator

ok, there's now a hook that allow to receive every Handshake message received. is it enough for your use case, or do you need the sent handshake too ?

@jonkri
Copy link
Author

jonkri commented Jul 10, 2013

Hi Vincent, and thank you for taking a look at this! :-)

The way I understand the situation, we need to be able to access the "Finished" struct sent in the (most recent) handshake of the connection. Since we don't support session resumption, I'm assuming that this will be the first finished message sent by the client. (Does this sound reasonable?)

In case we want to support renegotiation in the future, we will need the first "Finished" struct sent for the most inner-most connection used (which, analogously, I'm assuming to be the first Finished message sent by the server).

In addition to these callbacks, and enough context to decide which data to use, we will need some way of accessing the proper Handshake fields, and exports of their associated types (like FinishedData).

Take care!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants