我可以毫无问题地签署和验证测试文件gpg,但通过 OpenGPG.js 验证签名失败,并出现错误“消息摘要不匹配”。为什么是这样?
$ gpg --armor --quiet --batch --yes --detach-sig index.html
$ gpg --verify index.html.asc index.html
gpg: Signature made Wed 25 Nov 2020 08:26:34 PM PST
gpg: using RSA key C361FDC3F93B9E8F8BD7E08D5F873051B2D6C347
gpg: Good signature from <key>
$ node sandbox.js
{ signatures:
[ { keyid: [Keyid],
verified: [Promise],
signature: [Signature],
valid: false,
error:
Error: Message digest did not match
at Signature.verify (/home/caleb/src/islands/node_modules/openpgp/dist/openpgp.js:41176:11)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3) } ],
data: 'Test!\n' }
qq_遁去的一_1
相关分类