How to extract TLS connection data (ssleuth)

How can I extract TLS connection info. similar to euth:
https://addons.mozilla.org/en-GB/firefox/addon/ssleuth/

I mean what APIs I can use? even for legacy browsers (it is for testing purposes).