workerd icon indicating copy to clipboard operation
workerd copied to clipboard

[FEATURE] Expose Peer Certificate Info in TLS Sockets

Open ghost opened this issue 2 years ago • 5 comments

Probably a long shot and outside the scope of workerd for now, but would be nice to have Web Workers API equivalent for tls.TLSocket from nodejs runtime. My particular use-case is being able to inspect peer certificate information like expiry date, TLS version and SN.

Feel free to close if it doesn't belong here

ghost avatar Aug 19 '23 12:08 ghost

TLS sockets are supported (https://developers.cloudflare.com/workers/runtime-apis/tcp-sockets/#socketoptions). But the peer certificate information isn't exposed yet via the API.

dom96 avatar Aug 19 '23 21:08 dom96

Sorry Yes I just checked startTls must have missed it, but as you mentioned certificate info isn't exposed yet. Easy to bubble it up from cpp code in workerd or needs more plumbing in CF infra? Happy to give it a trry. Thank you

ghost avatar Aug 19 '23 21:08 ghost

Easy to bubble it up from cpp code in workerd or needs more plumbing in CF infra?

It'll need plumbing in CF infra

dom96 avatar Aug 19 '23 21:08 dom96

np not big deal for now just posting for visibility :-) - thanks!

ghost avatar Aug 19 '23 21:08 ghost

Is there any chance this might be possible today, or considered as an enhancement if not?

isnotnick avatar Oct 17 '24 10:10 isnotnick