2.1.4.2. 通过GnuPG进行签名检查
验证安装软件包完整性和真实性的另一个方法是使用加密签名。这比使用MD5校验和更可靠,但是需要更多的工作。
MySQL AB用GnuPG(GNU Privacy Guard)对下载MySQ软件包进行签名。GnuPG是开放源码,不同于Phil Zimmermann的闻名的Pretty Good Privacy (PGP)。关于GnuPG和如何获得并安装到你的系统的详细信息,请参见Linux分发版装有默认安装的GnuPG。关于GnuPG的详细信息,参见
要想验证具体安装软件包的签名,你首先需要获得MySQL AB公共GPG构建密钥的拷贝。可以从build@mysql.com。另外,可以从下面的文本直接剪切并粘贴密钥:
Key ID:
pub 1024D/5072E1F5 2003-02-03
MySQL Package signing key (www.mysql.com)
Fingerprint: A4A9 4068 76FC BD3C 4567 70C8 8C71 8D3B 5072 E1F5
Public Key (ASCII-armored):
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
mQGiBD4+owwRBAC14GIfUfCyEDSIePvEW3SAFUdJBtoQHH/nJKZyQT7h9bPlUWC3
RODjQReyCITRrdwyrKUGku2FmeVGwn2u2WmDMNABLnpprWPkBdCk96+OmSLN9brZ
fw2vOUgCmYv2hW0hyDHuvYlQA/BThQoADgj8AW6/0Lo7V1W9/8VuHP0gQwCgvzV3
BqOxRznNCRCRxAuAuVztHRcEAJooQK1+iSiunZMYD1WufeXfshc57S/+yeJkegNW
hxwR9pRWVArNYJdDRT+rf2RUe3vpquKNQU/hnEIUHJRQqYHo8gTxvxXNQc7fJYLV
K2HtkrPbP72vwsEKMYhhr0eKCbtLGfls9krjJ6sBgACyP/Vb7hiPwxh6rDZ7ITnE
kYpXBACmWpP8NJTkamEnPCia2ZoOHODANwpUkP43I7jsDmgtobZX9qnrAXw+uNDI
QJEXM6FSbi0LLtZciNlYsafwAPEOMDKpMqAK6IyisNtPvaLd8lH0bPAnWqcyefep
rv0sxxqUEMcM3o7wwgfN83POkDasDbs3pjwPhxvhz6//62zQJ7Q7TXlTUU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5tryVI3Fx78XeSYfQvuuwqp2H139pXGEkg0n6KdUOetdZ
Whe70YGNPw1yjWJT1IhMBBgRAgAMBQI+PqMdBQkJZgGAAAoJEIxxjTtQcuH17p4A
n3r1QpVC9yhnW2cSAjq+kr72GX0eAJ4295kl6NxYEuFApmr1+0uUq/SlsQ==
=YJkx
-----END PGP PUBLIC KEY BLOCK-----
你可以使用gpg --import将构建密钥导入你的个人公共GPG钥匙圈(keyring)。例如,如果你把密钥保存到mysql_pubkey.asc文件中,导入命令应为:
shell>gpg --import mysql_pubkey.asc
关于公共密钥如何工作的详细信息,请参阅GPG文档。
下载并导入公共构建密钥后,下载期望的MySQL安装软件包和相应的签名,也可以从下载页上获得。签名文件名与分发版文件相同,有an .asc扩展名。例如:
分发文件
mysql-st和ard-5.1.2-alpha-linux-i686.tar.gz
签名文件
mysql-st和ard-5.1.2-alpha-linux-i686.tar.gz.asc
确保两个文件保存在同一目录下,运行下面的命令来验证分发文件的签名:
shell>gpg --verify package_name.asc
示例:
shell> gpg --verify mysql-standard-5.1.2-alpha-linux-i686.tar.gz.asc
gpg: Signature made Tue 12 Jul 2005 23:35:41 EST using DSA key ID 5072E1F5
gpg: Good signature from "MySQL Package signing key (www.mysql.com) "
Good signature消息表示所有内容都很正确。你可以忽略任何insecure memory警告。