verifying detached signature with BC

后端 未结 3 1776
陌清茗
陌清茗 2020-12-16 03:54

How can I verify a detached signature (CMS/pkcs #7 signature) using the BouncyCastle provider in Java?

Currently, my code below throws an exception with the message

3条回答
  •  春和景丽
    2020-12-16 04:43

    You can find the answer to this post here. This happening because how bouncy castle/open ssl treats the S/MIME message when S/MIME headers are not present.Solution is to add S/MIME headers to the message before signimg

提交回复
热议问题