I have a PKCS7-signed file in DER format, pkcs_input, and I want to extract the data out of it.
Running the command: openssl pkcs7 -in pkcs_input -inform DER -print
results in the following output:
PKCS7:
type: pkcs7-signedData (1.2.840.113549.1.7.2)
d.sign:
version: 1
md_algs:
[...]
contents:
type: pkcs7-data (1.2.840.113549.1.7.1)
d.data:
0000 - [hex data] [ASCII data]
[...]
cert:
cert_info:
[...]
And then, in order to get the data (marked with [ASCII data]) out of this output, I have to manually parse the entire output.
Is there any other way to get the data only?