自从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. .net调用存储过程碰到的一个问题

    问题描述 报错信息如下: Execution of user code in the .NET Framework is disabled. Enable "clr enabled" ...

  2. qml android 的一个例子qtHangMan

    这个例子有2个好处: 1.解决了黑屏问题 2.演示了应用内购买的问题

  3. Centos 下搭建SVN + Apache 服务器(转载)

    安装软件包 ? 1 # yum install httpd ? 1 # yum install mod_dav_svn ? 1 # yum install subversion 2.  验证安装 ? ...

  4. NSDateFormatter 根据时间戳求出时间

    NSDateFormatter 根据时间戳求出时间 - (void)detailWithStyle:(NSString*)style time:(NSInteger)time { // NSStrin ...

  5. hdu 4611 Balls Rearrangement

    http://acm.hdu.edu.cn/showproblem.php?pid=4611 从A中向B中移动和从B中向A中移动的效果是一样的,我们假设从B中向A中移动 而且A>B 我们先求出所 ...

  6. winform插入sql的事务处理

    实现目的:点击按钮,原子性执行两条sql语句,同时成功或同时失败 数据库有这三个字段(忽略已有的一条记录): 一.用事务的sql语句 按钮事件完整代码: //事务处理插入sql语句 using (SQ ...

  7. Memcached 及 Redis 架构分析和比较

    Memcached和Redis作为两种Inmemory的key-value数据库,在设计和思想方面有着很多共通的地方,功能和应用方面在很多场合下(作为分布式缓存服务器使用等) 也很相似,在这里把两者放 ...

  8. 阻止Infinitescroll.js无限滚动加载页面解决方法

    由于某些原因,想终止当前页继续翻页的操作,可在Infinitescroll回调函数中将翻页事件取消. 代码如下: // -- 每页滚屏加载的页数-- var IpageItems = 5; var i ...

  9. java基础之 string

    一 string public final class String 继承自java.lang.Object类. 实现了接口: java.io.Serializable, Comparable< ...

  10. Html获取经纬度

    if (navigator.geolocation) { navigator.geolocation.getCurrentPosition( function success(pos) {alert( ...