自从XcodeGhost之后下载软件之后也会先验证一下md5sum,现在发现后面还有gpg签名,于是也开始学习一下。

  • gpg的文件在centos6.4上是默认安装的,其安装使用可以参照ruanyifeng的文章

这里主要讲一下怎么对下载的文件进行验证。

  • 首先当然是下载安装文件,这次下载的使用wso2的data service server 3.2.1,下载地址

  • 然后是打开gpg文件,如下图1所示,将这个文件也下载下来

  • 在term下面执行gpg --verify wso2dss-3.2.1.zip.asc,可以得到如下的提示

gpg: Signature made Tue 13 May 2014 05:06:11 AM PDT using RSA key ID 2B2458BF
gpg: Can't check signature: No public key
  • 原因是没有2B2458BF这个KEY ID的公钥,于是可以使用以下语句下载公钥

$ gpg --search-keys 2B2458BF
gpg: searching for "2B2458BF" from hkp server keys.gnupg.net
gpg: keyserver timed out
gpg: keyserver search failed: Keyserver error
  • 发现错误,可能是端口的问题,参照此文的解答,使用以下命令下载公钥。

$ sudo gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 2B2458BF
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/root/.gnupg/secring.gpg' created
gpg: keyring `/root/.gnupg/pubring.gpg' created
gpg: requesting key 2B2458BF from hkp server keyserver.ubuntu.com
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 2B2458BF: public key "Anjana Fernando (LA_F) " imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
  • 再进行校验,就可以得到成功的信息。

$ sudo gpg --verify wso2dss-3.2.1.zip.asc
gpg: Signature made Tue 13 May 2014 05:06:11 AM PDT using RSA key ID 2B2458BF
gpg: Good signature from "Anjana Fernando (LA_F) "
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 56EA 3B61 4CC4 7875 A865 0858 8E1A ACF4 2B24 58BF

gpg --verify之"Can't check signature: No public key"的更多相关文章

  1. GPG error: the public key is not available

    GPG error: The following signatures couldn't be verified because the public key is not available I h ...

  2. GPG error: http://extras.ubuntu.com trusty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F60F4B3D7FA2AF80

    今天在更新运行apt-get update的时候出现了如下的错误: W: GPG error: http://extras.ubuntu.com trusty Release: The followi ...

  3. W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8CF63AD3F06FC659

    报错信息: W: GPG error: http://ppa.launchpad.net trusty InRelease: The following signatures couldn't be ...

  4. nginx 安全配置文档

    1.配置文档中有多处明确写出了nginx的配置文件路径,该路径是测试环境中的路径,线上系统的nginx配置文件与文档中所写的路径可能不一样,在进行相关配置时,应以线上配置文件的实际路径为准. 线上系统 ...

  5. (转)nginx 安全配置文档

    原文:https://www.cnblogs.com/heaven-xi/p/9961357.html#top 1.配置文档中有多处明确写出了nginx的配置文件路径,该路径是测试环境中的路径,线上系 ...

  6. How to compile and install Linux Kernel 5.1.2 from source code

    How to compile and install Linux Kernel 5.1.2 from source code Compiling a custom kernel has its adv ...

  7. Redis——redis使用redis-dump,redis-load导出导入数据——【三】

    来源 https://www.cnblogs.com/dadonggg/p/8662455.html https://blog.csdn.net/chenxinchongcn/article/deta ...

  8. Redis redis-trib集群配置

    redis文档:http://doc.redisfans.com/ 参考:https://www.cnblogs.com/wuxl360/p/5920330.html http://www.cnblo ...

  9. OpenSSL Command-Line HOWTO

    OpenSSL Command-Line HOWTO The openssl application that ships with the OpenSSL libraries can perform ...

随机推荐

  1. js基础之面向对象

    一.基本概念 Array类 ————> 不具备实际的功能,只能用来构造对象 arr对象  ————> 有实际的功能,被类给构造出来 如:var arr=new Array(); proto ...

  2. TableLayout练习

    <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android=" ...

  3. LTP学习

    下载LTP源码和模型文件: https://github.com/linux-test-project/ltp 官方说明文档 http://ltp.readthedocs.org/zh_CN/late ...

  4. get( )与getline( )区别

    get与getline区别不是很大,但一个明显的区别是get遇到 '\n '字符后便返回,这是 '\n '还在缓冲区中,所以下次读出来的将是 '\n ',而getline遇到 '\n '也返回,但它会 ...

  5. hdu 1033 (bit masking, utilization of switch, '\0' as end of c string) 分类: hdoj 2015-06-15 21:47 37人阅读 评论(0) 收藏

    bit masking is very common on the lower level code. #include <cstdio> #include <algorithm&g ...

  6. 记录一些容易忘记的属性 -- UIView

    一个视图原来添加在某个父视图上,然后再将它添加到另外的一个视图上,这个视图会从原来的某个父视图中移除,添加到新的视图上. 子视图对象指针存在父视图的subviews数组中,说明,一个视图可以有多个子视 ...

  7. MongoDB应用篇(转)

    一.高级查询 1. 查询操作符 1.1 比较操作符$gt,$lt,$gte,$lte 实例: select * from things where field<value -- 等价于db.th ...

  8. 关于GSMMAP分支cell_log扫描不正常问题的解决办法

    阔别多年,本周在KALI 2.0下重拾旧时趣味,可怎么折腾都未曾见ARFCN,迫不得已还刷了brust_ind分支 才达到目的.后经仔细翻阅官方文档发现此问题早有披露,解决方案也已经公布,逐分享给大家 ...

  9. Tips about Object-oriented programming

    1, Return subinterface For example, we have a parent interface: public interface A<T extends A< ...

  10. linux命令:rm

    1.介绍: rm用来删除文件或者目录,对于链接文件,只删除了链接,不删除源文件.rm是一个非常危险的命令,像rm -rf /这个命令运行后,后果不堪设想. 2.命令格式: rm [选项] 文件/目录 ...