$ sha256sum --ignore-missing --check SHA256SUMS.asc bitcoin-0.16.3-x86_64-linux-gnu.tar.gz: OK sha256sum: WARNING: 20 lines are improperly formatted
在上述命令生成的输出中,必须确保输出内容中包含“OK”。
通过运行以下命令拉取发布签名密钥的副本:
1 2 3 4 5 6 7
$ gpg --recv-keys 01EA5486DE18A882D4C2684590C8019E36C2E964 gpg: requesting key 36C2E964 from hkp server keys.gnupg.net gpg: /home/lishude/.gnupg/trustdb.gpg: trustdb created gpg: key 36C2E964: public key "Wladimir J. van der Laan (Bitcoin Core binary release signing key) <laanwj@gmail.com>" imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1)
laanwj 是当前 BitcoinCore 的维护者和版本发布者,上面命令就是导入他的公钥。
然后就可以验证校验和文件是否签名正确:
1 2 3 4 5 6
$ gpg --verify SHA256SUMS.asc gpg: Signature made Wed 19 Sep 2018 04:23:24 AM CST using RSA key ID 36C2E964 gpg: Good signature from "Wladimir J. van der Laan (Bitcoin Core binary release signing key) <laanwj@gmail.com>" 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: 01EA 5486 DE18 A882 D4C2 6845 90C8 019E 36C2 E964
$ bitcoin-cli --version Bitcoin Core RPC client version v0.16.3 $ bitcoind --version Bitcoin Core Daemon version v0.16.3 Copyright (C) 2009-2018 The Bitcoin Core developers
Please contribute if you find Bitcoin Core useful. Visit <https://bitcoincore.org> for further information about the software. The source code is available from <https://github.com/bitcoin/bitcoin>.
This is experimental software. Distributed under the MIT software license, see the accompanying file COPYING or <https://opensource.org/licenses/MIT>
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit <https://www.openssl.org> and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.
// The 'error' event is emitted if the worker thread throws an uncaught exception. // In that case, the worker will be terminated. worker.on("error", (err /* Error*/) => { reject(err); // exit thread worker.terminate(); }); }); };
如果要想先下载依赖,那么可以直接像以前那样 go get 即可,不过 gomod 下可以跟语义化版本号,比如 go get foo@v1.2.3,也可以跟 git 的分支或 tag,比如go get foo@master,当然也可以跟 git 提交哈希,比如 go get foo@e3702bed2。需要特别注意的是,gomod 除了遵循语义化版本原则外,还遵循最小版本选择原则,也就是说如果当前版本是 v1.1.0,只会下载不超过这个最大版本号。如果使用 go get foo@master,下次在下载只会和第一次的一样,无论 master 分支是否更新了代码,如下所示,使用包含当前最新提交哈希的虚拟版本号替代直接的 master 版本号。
1 2 3 4 5 6 7 8 9 10 11 12
$ go get golang.org/x/crypto/sha3@master go: finding golang.org/x/crypto/sha3 latest go: finding golang.org/x/crypto latest $ cat go.mod module github.com/adesight/test
LGTM — looks good to me ACK — acknowledgement, i.e. agreed/accepted change NACK/NAK — negative acknowledgement, i.e. disagree with change and/or concept RFC — request for comments, i.e. I think this is a good idea, lets discuss WIP — work in progress, do not merge yet AFAIK/AFAICT — as far as I know / can tell IIRC — if I recall correctly IANAL — “ I am not a lawyer ”, but I smell licensing issues