https://bz.apache.org/bugzilla/show_bug.cgi?id=63524

--- Comment #10 from Christopher Schultz <ch...@christopherschultz.net> ---
I realize that this conversation is headed in another direction, but...

(In reply to Mark Thomas from comment #4)
> OpenSSL can handle DER quite happily but the code we added to enable you to
> switch seamlessly between OpenSSL and JSSE only works with PEM.

The hard part is detecting the DER file, not reading it. JSSE will happily read
a DER file in the same way it reads a PEM-encoded file:

FileInputStream fis = new FileInputStream("certificate.der");
CertificateFactory cf = CertificateFactory.getInstance("X.509");
Certificate cert = cf.generateCertificate(fis);

This will work either raw DER or PEM-encoded DER files. There are no hard and
fast rules for reading multiple certificates in DER format so I think that DER
files would have to be either single-cert only or we'd need to do some
digging-around to see how other software handles multiple certs without PEM
encoding.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to