How to get website's https certificate on linux command line?

I can use wget or a similar command line tool to get an HTTPS response from a server. On Firefox/chrome browser, I can simply download the certificate in pem format through the user interface, then add it to my trust host list. How can I download the same HTTPS certificate through the Linux command line?… Read More How to get website's https certificate on linux command line?

SHA256 fingerprint from X509Certificate

How to decode the SHA256 fingerprint from X509Certificate in Kotlin without third library usage in hex. X509Certificate get SHA256 >Solution : you can use the MessageDigest from Java Security API import java.security.MessageDigest import java.security.cert.X509Certificate fun decodeSHA256Fingerprint(cert: X509Certificate): String { val sha256 = MessageDigest.getInstance("SHA-256") val fingerprint = sha256.digest(cert.encoded) return fingerprint.joinToString(separator = "") { String.format("%02x", it) }… Read More SHA256 fingerprint from X509Certificate