Java keytool cannot print Base64 encoded pem certificate, but can import it 

Joined:
07/27/2010
Posts:
130

April 06, 2011 14:50:01    Last update: April 06, 2011 15:00:03
C:\tmp>keytool -printcert -file CERT.pem
keytool error: java.lang.Exception: Failed to parse input

C:\tmp>keytool -importcert -trustcacerts -alias android -file CERT.pem
Enter keystore password:
Owner: CN=Android team, OU=MegaC Mobile, O=MegaC, L=LA, ST=CA, C=90345
Issuer: CN=Android team, OU=MegaC Mobile, O=MegaC, L=LA, ST=CA, C=90345
Serial number: 4c9cc176
Valid from: Fri Sep 24 10:19:18 CDT 2010 until: Mon Sep 21 10:19:18 CDT 2020
Certificate fingerprints:
         MD5:  7F:05:99:0C:76:0C:94:69:B4:0D:B6:04:A9:B2:9F:01
         SHA1: 21:EF:04:F2:9D:21:49:61:E3:4C:C9:66:57:5D:E6:58:FE:0D:2E:8A
         Signature algorithm name: MD5withRSA
         Version: 1
Trust this certificate? [no]:  y
Certificate was added to keystore
Share |
| Comment  | Tags