Post History
I have a TLS certificate, let's say codidact.pem (downloaded as in https://linux.codidact.com/posts/292251/292257#answer-292257). But when I view it the file it appears to be base64 encoded: $ cat...
#2: Post edited
I have a TLS certificate, let's say `server.crt`, but when I view it as text it appears to be base64 encoded with `BEGIN CERTIFICATE` lines.- How can I see the contents of the certificate, from the command line?
- I have a TLS certificate, let's say `codidact.pem` (downloaded as in https://linux.codidact.com/posts/292251/292257#answer-292257)[](). But when I view it the file it appears to be base64 encoded:
- ```
- $ cat codidact.pem
- -----BEGIN CERTIFICATE-----
- MIIDqDCCA06gAwIBAgIQFUeE1XIvh5MNywyN4cuLUTAKBggqhkjOPQQDAjA7MQsw
- CQYDVQQGEwJVUzEeMBwGA1UEChMVR29vZ2xlIFRydXN0IFNlcnZpY2VzMQwwCgYD
- VQQDEwNXRTEwHhcNMjQwNzE5MjI1NzQ0WhcNMjQxMDE3MjI1NzQzWjAXMRUwEwYD
- VQQDEwxjb2RpZGFjdC5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATPSLUR
- GJEdUQgOV/55h9+55cU6EoIBSO0v2ud3tVsDIFd2G02PgdmGeT9jEtHNYFEExhyl
- 9QXOGhZbKACKP/sGo4ICVjCCAlIwDgYDVR0PAQH/BAQDAgeAMBMGA1UdJQQMMAoG
- CCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFJCOyNG3GnEEITEdClgY
- OveIurSQMB8GA1UdIwQYMBaAFJB3kjVnxP+ozKnme9mAeXvMk/k4MF4GCCsGAQUF
- BwEBBFIwUDAnBggrBgEFBQcwAYYbaHR0cDovL28ucGtpLmdvb2cvcy93ZTEvRlVj
- MCUGCCsGAQUFBzAChhlodHRwOi8vaS5wa2kuZ29vZy93ZTEuY3J0MCcGA1UdEQQg
- MB6CDGNvZGlkYWN0LmNvbYIOKi5jb2RpZGFjdC5jb20wEwYDVR0gBAwwCjAIBgZn
- gQwBAgEwNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2MucGtpLmdvb2cvd2UxL2M5
- ZWdZOWlrUHNVLmNybDCCAQUGCisGAQQB1nkCBAIEgfYEgfMA8QB2ANq2v2s/tbYi
- n5vCu1xr6HCRcWy7UYSFNL2kPTBI1/urAAABkM1uH3UAAAQDAEcwRQIgAr7iugfA
- kjExK2ZcRyUNlfOT2PXUYj7CqBa3G64+IuYCIQCW3Rjsm7v57IWdNWPncgUutHqj
- L22VjyVlLF1DSYLFhQB3AO7N0GTV2xrOxVy3nbTNE6Iyh0Z8vOzew1FIWUZxH7Wb
- AAABkM1uHzgAAAQDAEgwRgIhAI27YgHLST7sAa46XvUxGt1HO03nyy5CjnHSUAEc
- SJugAiEAzs6An9NyXMV3ktidEysoRl/o9oDSMwEVhjNwI79+JfAwCgYIKoZIzj0E
- AwIDSAAwRQIgBohJMzekzkYdS9X9eopTUEpBpmMMOiGc7+6hT6D1CisCIQDEiuPA
- z6+KeqCZnRIy+X4J0n0qI914lCLkEDytyAJWaA==
- -----END CERTIFICATE-----
- ```
- How can I see the contents of the certificate, from the command line?