Why does `openssl asnparse` not give an error but `openssl x509` does for a DER file?

115 views Asked by At

I have a base64 encoded file (named bst) that after base 64 decoding (base64 -d bst > bst.der) becomes a DER encoded file (bst.der). Running the command openssl asn1parse -inform der -in bst.der does not give errors and displays it. But running the command openssl x509 -inform der -in bst.der gives the below error when I thought it was supposed to display the file in a more human readable format? It also gives an error when running with openssl pkcs7 and openssl pkcs8.

Could not read certificate from bst.der 40F7679CD07F0000:error:1608010C:STORE routines:ossl_store_handle_load_result:unsupported:../crypto/store/store_result.c:151: Unable to load certificate

If the file is a valid ASN.1 file, why can it not be read as another format?

0

There are 0 answers