DenoDDeno
Powered by
themountaindudeT
Denoβ€’17mo ago
themountaindude

Get https server's cert common/alt names using Deno?

Pretty new to Deno but have been using Node for some years.

== Question 1:
I am trying to create a little Deno 2 tool that connects to a server on a specific host/port, then pulls down the server's TLS cert info and shows it to the user.
The cmoon and alt names are of particular interest.

I can get these by running openssl from command line (and via Node.js actually), but I eventually want to integrate this into a larger Deno app.

Seems the TlsConn interface lacks any connection/cert info..
Would this be possible using today's Deno?
Or are these low-level network features still on the todo list?


== Question 2:
When connecting to TLS protected servers it's of course important to connect using the correct hostnames, otherwise a warning will appear.
Now, we can disable this protection by specifying the option
--unsafely-ignore-certificate-errors
--unsafely-ignore-certificate-errors
at startup. Not pretty or good, but works. And useful sometimes in testing scenarios.

But is it possible to specify the same thing at run/connection time (i.e. not during startup)?
Seems not... but is that really the case?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

HTTPS custom cert passphrase in Deno?
abiAabi / help
3y ago
Deno Deploy --cert flag
bera.funBbera.fun / help
4y ago
Deno + Vite + DenoKV
AndiAAndi / help
2y ago
Deno.server get request ip
cococoreCcococore / help
9mo ago