使用 openssl 我在服务器上创建了签名文档,请参阅下面的命令。
------创建私钥。
openssl pkcs12 -in "D:\Cummins Issues\XML Encryption\mycredentialsandkey2010.pfx" -nodes -nocerts -out "D:\privatekey.pem" -nodes
------创建公钥。
openssl rsa -in "D:\privatekey.pem" -pubout -out "D:\rsapublickey.pem"
------创建签名文档。
openssl dgst -sha1 -sign "D:\privatekey.pem" -out "D:\ProductInformation_xml.cipher" "D:\ProductInformation.xml"
现在我可以使用如下所示的 opensll 验证数字签名
- -核实
openssl dgst -sha1 -verify "D:\rsapublickey.pem" -signature "D:\ProductInformation_xml.cipher" "D:\ProductInformation.xml"
但我需要在客户端应用程序中使用 C++ 和 Windows API 验证数字签名(没有 openssl 库或源代码)。我知道使用公钥和哈希我们可以验证数字签名。请尽快向我提供伪代码或 Windows API。
任何帮助表示赞赏。