Those aren't certificate types, they are encodings. (You can almost think of them like character sets; uincode utf-8 utf-16 for example).
I'm not aware of any tests in openssl, but I could be wrong. If the file is ascii, or has a line that starts with five "-" characters, or the filename ends with .pem then it is probably a PEM file. You can try to decode it using each format and see what works. -- Principal Security Engineer Akamai Technology Cambridge, MA From: owner-openssl-us...@openssl.org [mailto:owner-openssl-us...@openssl.org] On Behalf Of sharad tekale Sent: Wednesday, February 05, 2014 4:57 AM To: openssl-users@openssl.org Subject: Regarding certificate type Dear folks, I was wondering if openssl library has support(function) to distinguish types of certificates? I'm looking for some time is_pem(<certificate_path>) or is_der(<certificate_path>) functions.? Kindly let me know where i can get this info. Thanks Sharad.