Print and convert Android CERT.RSA certificate information with OpenSSL 

Joined:
07/27/2010
Posts:
130

April 06, 2011 14:58:43    Last update: May 05, 2011 14:52:49
To view certificate in CERT.RSA:
C:\tmp>openssl pkcs7 -inform DER -in CERT.RSA -noout -print_certs -text
Certificate:
    Data:
        Version: 1 (0x0)
        Serial Number: 1285341558 (0x4c9cc176)
        Signature Algorithm: md5WithRSAEncryption
        Issuer: C=90345, ST=CA, L=LA, O=MegaC, OU=MegaC Mobile, CN=Android team
        Validity
            Not Before: Sep 24 15:19:18 2010 GMT
            Not After : Sep 21 15:19:18 2020 GMT
        Subject: C=90345, ST=CA, L=LA, O=MegaC, OU=MegaC Mobile, CN=Android team
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
            RSA Public Key: (1024 bit)
                Modulus (1024 bit):
                    00:8b:d5:13:7f:aa:82:36:0e:6f:25:3d:a3:59:35:
                    b1:ec:d7:0c:13:40:a2:67:73:bc:56:e2:15:d5:cd:
                    fd:48:b4:b2:09:f2:e4:00:ad:3a:78:b9:7c:96:24:
                    05:b9:1e:97:e0:16:3a:51:5a:d6:a6:9c:b2:67:f2:
                    6e:ca:dc:ed:32:08:f1:b0:e2:60:bd:3a:64:14:ce:
                    60:f7:e5:de:06:0d:27:c0:08:87:fe:9c:5a:3f:87:
                    e7:6e:27:61:6f:14:61:d4:a2:ba:ec:5d:9e:4f:dd:
                    db:d1:44:70:2f:92:d2:ae:07:bd:d8:a8:94:f2:5c:
                    c8:99:51:a5:cf:92:dd:77:f7
                Exponent: 65537 (0x10001)
    Signature Algorithm: md5WithRSAEncryption
        6e:41:4e:57:1c:51:ac:93:64:39:8b:d3:f1:62:e0:ac:51:a5:
        29:c1:83:78:90:c6:39:26:32:d0:fb:de:df:be:af:5e:6e:f9:
        0d:ff:ef:89:7f:14:d4:26:19:66:e1:2e:3b:26:d8:17:4d:3f:
        e6:21:3c:f0:05:19:40:fc:5c:5c:0d:70:5e:eb:b5:14:8d:42:
        86:f8:e8:44:73:12:63:97:81:bd:d6:77:93:e9:db:bf:9a:62:
        5f:f2:2e:95:7f:8d:5d:aa:e6:57:c9:e7:ea:c3:4f:ca:32:7f:
        46:42:d5:d4:20:8f:a7:eb:38:76:3c:17:8b:de:60:39:26:01:
        cb:d0


To convert certificate to PEM:
openssl pkcs7 -inform DER -in CERT.RSA -out CERT.pem -outform PEM  -print_certs


Java keytool also works:
$ keytool -printcert -file CERT.RSA 
Owner: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
Issuer: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
Serial number: b3998086d056cffa
Valid from: Tue Apr 15 18:40:50 EDT 2008 until: Sat Sep 01 18:40:50 EDT 2035
Certificate fingerprints:
	 MD5:  8D:DB:34:2F:2D:A5:40:84:02:D7:56:8A:F2:1E:29:F9
	 SHA1: 27:19:6E:38:6B:87:5E:76:AD:F7:00:E7:EA:84:E4:C6:EE:E3:3D:FA


Share |
| Comment  | Tags