想知道openssl smime -sign获取摘要值的命令。
像下面的东西 -
MIME-Version: 1.0
Content-Type: multipart/signed;protocol="application/pkcs7-
signature";micalg="sha-256";boundary="707e08bf1d5b44f6b18bc0999df569c8"
This is an S/MIME signed message
--707e08bf1d5b44f6b18bc0999df569c8
<cms>
<file>
<name>index.xml</name>
<digest>4pDBO3/ZNCpaAvxOWbQ0AUnDbT1oAaWMrPIDZz/a1i0=</digest>
<digesttype>sha256</digesttype>
<path>.</path>
</file>
</cms>
--707e08bf1d5b44f6b18bc0999df569c8
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0B
……
生成它的命令是什么?
验证使用 -
openssl smime -verify -in sign -CAfile Sign_Key.crt -out xmlwithdigest
openssl dgst -binary -sha256 infile | openssl base64
然后比较摘要值?