Linux下使用.sig文件验证签名

编程入门 行业动态 更新时间:2024-10-08 03:27:57

Linux下使用.sig<a href=https://www.elefans.com/category/jswz/34/1771438.html style=文件验证签名"/>

Linux下使用.sig文件验证签名

以 libunwind-1.70.tar.gz 和 libunwind-1.70.tar.gz.sig 为例

  1. 将 libunwind-1.70.tar.gz 和 libunwind-1.70.tar.gz.sig 放在同一路径下

  2. 使用gpg进行验证,此时输出如注释所示(no public key)

$ gpg --verify libunwind-1.70.tar.gz.sig libunwind-1.70.tar.gz
# output:
# gpg: signature made 2023年06月04日 星期日 2时20分45秒 CST
# gpg:              using RSA kev OAOFF845B7DB3427
# gpg:Can't check signature: No public key
  1. 根据gpg提示的key找到公钥,此时提示 new key but contains no user ID - skipped
$ gpg --recv-keys 0x0A0FF845B7DB3427
# output:
# gpg:key 0A0FF845B7DB3427: new key but contains no user ID - skipped
# gpg:Total number processed: 1
# gpg:          w/o user IDs: 1
  1. 切换服务器
$ gpg --key-server hkp://pgp.mit.edu --recv-keys 0x0A0FF845B7DB3427
# output:
# gpg: key 0A0FF845B7DB3427: public key "stephen M. Webb <stephen.webbabregmasoft.ca>" imported
# gpg:Total number processed: 1
# gpg:              imported: 1
  1. 再次验证
$ gpg --verify --verbose libunwind-1.70,tar .gz.sig libunwind1.70.tar.gz
# output:
# gpg:              using RSA key AOFF845B7DB3427
# gpg:using pgp trust model
# gpg:Good signature from "stephen M. Webb stephen.webbabregmasoft.ca>" [unknown]
# gpg:                aka "stephen M.Webb <stephen@ubuntu>" [unknown]
# gpg:                aka "stephen M.Webb <stephen.webbacanonical>" [unknown]
# gpg:                aka "[jpeg image of size 3674]" [unknown]
# gpg:WARNING: This key is not certified with a trusted signature!
# gpg:  There is no indication that the signature belongs to the owner

  • 参考链接:
  • .html

更多推荐

Linux下使用.sig文件验证签名

本文发布于:2024-02-24 21:07:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1696654.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   Linux   sig

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!