OpenSSL uses DER but I need BER format: does OpenSSL support BER?
The short answer is yes, because DER is a special case of BER and OpenSSL ASN1 decoders can process BER. The longer answer is that ASN1 structures can be encoded in a number of different ways. One set of ways is the Basic Encoding Rules (BER) with various permissible encodings. A restriction of BER is the Distinguished Encoding Rules (DER): these uniquely specify how a given structure is encoded. Therefore, because DER is a special case of BER, DER is an acceptable encoding for BER.