Is a X509 certificate in DER format ASN1 encoded?
问题 I'm using OpenSSl to encrypt and decrypt files based on CMS/SMIME. Normally I load certificates with rcert = PEM_read_bio_X509(tbio, NULL, 0, NULL); but this is only for PEM formatted files I guess. I haven't found any der.h header or something similar. So is there a way in OpenSSL to load DER formatted certificates? I've found the load function for ASN1 format which uses OpenSSL intern. if (format == FORMAT_ASN1) x=d2i_X509_bio(cert,NULL); But can that be used for DER which is binary? 回答1: