This content has been marked as final. Show 4 replies
According to the Javadoc for CertificateFactory.generateCertificates(), the input it recognizes is DER-encoded and may be further Base64-encoded, with the familiar -----BEGIN CERTIFICATE-----/-----END CERTIFICATE----- header and trailer, or a PKCS#7 certificate chain.
I am giving up looking for ASN.1 decoders
marben does NOT decode codec.sourceforge does NOT decode ViewBer does NOT decode
I guess oughta look for DER decoders
ASN1VE thinks it has decoded, but gives final element a bitstring 1022 which you might think was the public key,
except it isnt
and I believe the last item is 22.214.171.124 BasicConstraints 0402300 (java says so, and 0402300 << 2 = 1008C00 whereas my encoded ends in ...C08C0 notice some matching bits?
I've been waiting since the 90's for X509 to get rational.
Thanks Almighty that Java at least has come to the party.
ASN1VE does display some objects which java says are CN C L O OU et al
wo its not totally useless - maybe it has a DER switch ?
Edited by: 915773 on 14-Mar-2012 20:46
Yes, Certificates are encoded using ASN.1 DER (Distinguished Encoding Rules). There are several good ASN.1 Tools which can encode/decode valid Certificates using various programming languages: Java, C, C++, C# and more. A good list of ASN.1 Tools can be found at http://www.itu.int/ITU-T/asn1/links/index.htm.
Consider trying a free trial of the OSS ASN.1 Tools which includes ASN.1 Studio, an IDE that allows you to compile ASN.1 specifications and encode/decode messages without writing any code. Go to http://www.oss.com/asn1/products/asn1-download.html to download a free trial.