PEM works fine
openssl verify -CAfile CA/ca.crt leaf.cert.pem
But DER generated with openssl x509 -in leaf.cert.pem -outform der -out leaf.cert.der could not be verified
openssl verify -CAfile CA/ca.crt leaf.cert.der
produces
unable to load certificate
4613703104:error:0909006C:PEM routines:get_name:no start line:crypto/pem/pem_lib.c:745:Expecting: TRUSTED CERTIFICATE
openssl verify does not accept -inform der as other openssl commands.
Does this mean there is no way to verify DER directly and I need to convert it to PEM and then verify?