3 ms·
`openssl s_client` is underused, and it's not as clunky since they added support for host:port syntax over separate args. Encouraging thinking of that as the m
by GauntletWizard 3y ago
`openssl s_client` is underused, and it's not as clunky since they added support for host:port syntax over separate args. Encouraging thinking of that as the modern replacement would help.
- varenc 3y agoWow thanks for showing me about `openssl s_client`. I just have this a try and you're it was quite easy! openssl s_client -connect example.org:443 [TLS details...] GET / HTTP/1.1 Host: www.example.org <newline> <newline> [headers and HTML response!] The one thing tricker nowadays is almost all of the time you need to send the `Host:` header for things to work. Took me a sec to realize that since in 1998 it was almost never necessary.
- GauntletWizard 3y agoGlad to spread the knowledge, and glad you gave it a shot! It really is that easy, and host headers have been pretty regularly required anyway. Slightly more interesting is using it to access internal sites, and setting up your own TLS roots and chains for personal or corporate infrastructure. In practice, while useful for internal use, I generally recommend everyone use LetsEncrypt and public names for even internal APIs when they cross team boundaries, because it's just easier.