Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
492 views
in Technique[技术] by (71.8m points)

libressl - 无法验证smime签名(Unable to verify smime signature)

I've signed a file like this, using LibreSSL 2.8.3 on macOS:

(我已经在macOS上使用LibreSSL 2.8.3签署了这样的文件:)

openssl smime -binary -sign -certfile WWDR.pem -signer passcertificate.pem 
              -inkey passkey.pem -in manifest.json -out signature 
              -outform DER -passin pass:12345

and now I want to just immediately verify that same file.

(现在我想立即验证同一文件。)

I am trying the following command

(我正在尝试以下命令)

openssl smime -binary -verify -certfile WWDR.pem -signer passcertificate.pem 
              -inkey passkey.pem -in manifest.json -content signature 
              -inform DER -passin pass:12345

but that fails with the below error.

(但这失败,并显示以下错误。)

What's the proper syntax to verify the signature?

(验证签名的正确语法是什么?)

Error reading S/MIME message

(读取S / MIME消息时出错)
4550921836:error:0DFFF0A8:asn1 encoding routines:CRYPTO_internal:wrong tag:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.11.1/libressl-2.8/crypto/asn1/tasn_dec.c:1144:

(4550921836:错误:0DFFF0A8:asn1编码例程:CRYPTO_internal:错误标签:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.11.1/libressl-2.8/crypto/asn1/tasn_dec.c: 1144:)
4550921836:error:0DFFF03A:asn1 encoding routines:CRYPTO_internal:nested asn1 error:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.11.1/libressl-2.8/crypto/asn1/tasn_dec.c:317:Type=PKCS7

(4550921836:错误:0DFFF03A:asn1编码例程:CRYPTO_internal:嵌套的asn1错误:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.11.1/libressl-2.8/crypto/asn1/tasn_dec.c :317:Type = PKCS7)

I'm basically doing this because I want to try and implement the signing in swift.

(我基本上是这样做的,因为我想尝试并快速实施签名。)

I know the above sign command works properly, and so if I can figure out how to verify a file then I can properly test whether or not my Swift implementation works.

(我知道上面的sign命令可以正常工作,因此,如果我能弄清楚如何验证文件,那么就可以正确地测试我的Swift实现是否有效。)

  ask by Gargoyle translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...