![使用pgp或sha签名验证](https://i-blog.csdnimg.cn/blog_migrate/f8b8dda78d84df97e97821f24bfa2621.png)
使用pgp或sha签名验证
GnuPG is an opensource and popular alternative to the PGP. PGP provides encryption-related function. PGP provides a hash function like standard Linux packages. We will look ow to verify files downloaded from the internet with their PGP signatures to verify.
GnuPG是PGP的开源和流行替代方案。 PGP提供与加密有关的功能。 PGP提供了类似于标准Linux软件包的哈希函数。 我们将用PGP签名验证从Internet下载的文件。
查找PGP信息 (Find PGP Information)
In this example, we will use the Apache source code. Apache PGP signature can be found and downloaded like below.
在此示例中,我们将使用Apache源代码。 可以如下找到并下载Apache PGP签名。
$ wget https://www.apache.org/dist/httpd/httpd-2.4.38.tar.bz2.asc
![Find PGP Information](https://i-blog.csdnimg.cn/blog_migrate/647aec1c26e15295fc1007da03051ad8.png)
We can see that the signature file have asc
extension with the same name with the compressed source code file.
我们可以看到签名文件具有与压缩的源代码文件同名的asc
扩展名。
下载Apache源码 (Download Apache Source)
We will download Apache source code related with previously downloaded PGP signature.
我们将下载与先前下载的PGP签名相关的Apache源代码。
$ wget https://www.apache.org/dist/httpd/httpd-2.4.38.tar.bz2
![Download Apache Source](https://i-blog.csdnimg.cn/blog_migrate/91facaa2aec4932eef2dce43c54249bf.png)