-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
Thanks! I'll check everything later today. So far sounds good. |
Thanks :) |
Thanks for the code (I'm especially glad to see more tests and docs!).
No problem, because it's "developer's tool". It's good that it's mentioned in README.
We'll never have OpenSSL keylog callback available in Node 10.x, and 10.x is LTS, so it's important to support compatibility - which means we'll have to use some form of get_session_key internally anyway (but it can be hidden by our API for consistency). Isn't it too early to deprecate it? Let's think again about deprecation during implementing support for TLS 1.3; may be it will become more obvious - because we'll have to keep compatibility with TLS 1.2 as well.. I like idea of Also, I think that with new API we need some way to allow user to set own handler for logging secrets (for example, to keep only chosen secrets on a high-load server). I didn't yet think enough how to implement in simple/consistent way. May be optional second argument to |
Totally agree with switching to camelCase!
Yes, what I meant by deprecating |
Also, I think it'd be good to call Appends are atomic, so it makes no harm to begin another append when one hasn't finished. The only risk is keylog lines ending up in different order, but this shouldn't matter to Wireshark (every index is unique). |
About letting the user provide his own handler, I'd vote on leaving that to be implemented in future releases (as an optional second parameter to |
Do I understand correctly that you suggest to remove About About cameCase - glad that we agree. |
Hi, do you think we should merge this? I think that it would be better to integrate polyfill first (which already includes hook* functions), then merge things from this PR (especially docs), and then I review everything again and will publish npm. Also, if you don't object, I'd like to add you to README as co-author - you contributed a LOT of important code, thanks! |
I agree, let's merge pollyfill first :) |
- add hook_all and hook_socket - agent parameter defaults to globalAgent - only log each socket once
Back to this! A lot of things no longer apply, so I've made the commits again. If I understood correctly from #9, we're now moving in the direction of the polyfill. So, I have:
Other things:
|
Seems good! Thank you a lot. I'm going to publish npm today/tomorrow after additional review; I think now it deserves to be 1.0.0 version because of API breaking changes and a huge rework. |
Yeah, I agree :) |
I suggest we deprecate
update_log
andget_session_key
because it doesn't make sense on TLSv1.3 when (1) there are multiple sessions, and (2) OpenSSL keylog callback will be used instead of extracting session key manually. I think users should stick to thehook_
API. WDYT?I've also added a
hook_socket
function that hooks a single socket (for cases not covered by server or agent) andhook_all
which hooks TLSSocket constructor to hook all sockets, ever. It patches an internal function, so if you don't agree I'll exclude that from the PR.The rest is just pending things (tests, examples, README, changelog, add warning for Node.JS version), I think I'm not forgetting anything.