Apple - How to view certificate info without installing
I'm not sure if this was available in the OS you had at the time you wrote your question, but at least with OS X 10.11.6, if you select the .crt file in the Finder and press the spacebar, a Quick Look window will open and you can see all of that info in a nice display. Works for .pfx files too.
via Terminal.app and type something like:
openssl x509 -noout -text -in ~/Desktop/yourcertificate.crt
Where last parameter is a path your certificate file(you can drag and drop that if you like)
gives us:
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 27 (0x1b)
Signature Algorithm: sha1WithRSAEncryption
Issuer: C=US, O=Apple Inc., OU=Apple Certification Authority, CN=Apple Root CA
Validity
Not Before: May 26 19:16:09 2010 GMT
Not After : Jul 26 19:16:09 2017 GMT
Subject: C=US, O=Apple Inc., OU=Apple Certification Authority, CN=Apple Application Integration Certification Authority
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (2048 bit)
......
in addition to Krishen approved answer above about selecting the certificate (.cer, .pem, others) in finder and hitting 'space', you can also right click and select Quick Look . I just tested it on 10.14.1 (Mojave), so this definitely works on current OSX