Even if we potentially check the integrity of the downloaded file via hash comparison, we should make use of SSL since it is available.
depends: switch to secure download of all dependencies #16049
pull Kemu wants to merge 1 commits into bitcoin:master from Kemu:Berkeley_DB_SSL_source changing 16 files +18 −17-
Kemu commented at 8:25 PM on May 19, 2019: contributor
- fanquake added the label Build system on May 19, 2019
-
fanquake commented at 4:43 AM on May 20, 2019: member
Concept ACK
If we're going to do this, might as well make the change in all packages.
Looks like
http:->https:will work for everything exceptminiupnpc. That package could be changed to use thehttps://miniupnp.tuxfamily.org/files/mirror. -
practicalswift commented at 7:33 AM on May 20, 2019: contributor
Concept ACK
Not leaking is better than leaking.
-
kristapsk commented at 8:25 AM on May 20, 2019: contributor
Concept ACK
There is no downside in using HTTPS.
-
jonasschnelli commented at 9:18 AM on May 20, 2019: contributor
Tested ACK (manually downloaded
curl -OL https://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gzand verified the sha256 hash). -
jonatack commented at 9:47 AM on May 20, 2019: member
ACK
$ curl -OL https://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz $ sha256sum db-4.8.30.NC.tar.gz 12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gzSame hash as the non-SSL http curl from a couple months ago.
-
jonasschnelli commented at 10:09 AM on May 20, 2019: contributor
@Kemu Are you interested to also cover the other plain http packages in this pull?
grep -rnw './depends' -e 'http:' ./depends/packages/xtrans.mk:3:$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/ ./depends/packages/libxcb.mk:3:$(package)_download_path=http://xcb.freedesktop.org/dist ./depends/packages/freetype.mk:3:$(package)_download_path=http://download.savannah.gnu.org/releases/$(package) ./depends/packages/xextproto.mk:3:$(package)_download_path=http://xorg.freedesktop.org/releases/individual/proto ./depends/packages/libX11.mk:3:$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/ ./depends/packages/native_cctools.mk:8:$(package)_clang_download_path=http://llvm.org/releases/$($(package)_clang_version) ./depends/packages/zlib.mk:3:$(package)_download_path=http://www.zlib.net ./depends/packages/native_cdrkit.mk:3:$(package)_download_path=http://distro.ibiblio.org/fatdog/source/600/c ./depends/packages/xproto.mk:3:$(package)_download_path=http://xorg.freedesktop.org/releases/individual/proto ./depends/packages/xcb_proto.mk:3:$(package)_download_path=http://xcb.freedesktop.org/dist ./depends/packages/miniupnpc.mk:3:$(package)_download_path=http://miniupnp.free.fr/files ./depends/packages/fontconfig.mk:3:$(package)_download_path=http://www.freedesktop.org/software/fontconfig/release/ ./depends/packages/libXau.mk:3:$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/ ./depends/packages/bdb.mk:3:$(package)_download_path=http://download.oracle.com/berkeley-db ./depends/packages/libXext.mk:3:$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/ -
laanwj commented at 2:43 PM on May 20, 2019: member
utACK, as issues with
apthave shown, if in doubt it's better to use TLS, it's one extra layer of security. -
MarcoFalke commented at 9:31 PM on May 20, 2019: member
Please squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits
- Kemu force-pushed on May 20, 2019
-
dongcarl commented at 10:06 PM on May 20, 2019: member
Could you add something to
depends/packages.mdso that future depends packages will be written with this in mind? -
d8bc47fde4
depends: switch to secure download of all dependencies
Some dependency sources were downloaded via http, even though https (SSL/TLS) options are available. Even if we potentially check the integrity of the downloaded files via hash comparison, we should make use of this additional security layer. bdb.mk fontconfig.mk freetype.mk libX11.mk libXau.mk libXext.mk libxcb.mk native_cctools.mk native_cdrkit.mk xcb_proto.mk xextproto.mk xproto.mk xtrans.mk zlib.mk miniupnp was switched to official project mirror with SSL support
- Kemu force-pushed on May 20, 2019
-
Kemu commented at 10:37 PM on May 20, 2019: contributor
Could you add something to
depends/packages.mdso that future depends packages will be written with this in mind?good idea.
$(package)_download_path: Location of the upstream source, without the file-name. Usually http, https or ftp. Secure transmission options like https should be preferred if available. -
Kemu commented at 10:54 PM on May 20, 2019: contributor
make downloadseems to run without issues, except for native_cdrkit:Fetching cdrkit-1.1.11.tar.bz2 from https://distro.ibiblio.org/fatdog/source/600/c ... curl: (60) SSL certificate problem: unable to get local issuer certificate More details here: https://curl.haxx.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above.while directly running:wget https://distro.ibiblio.org/fatdog/source/600/c/cdrkit-1.1.11.tar.bz2orcurl https://distro.ibiblio.org/fatdog/source/600/c/cdrkit-1.1.11.tar.bz2 --output cdrkit-1.1.11.tar.bz2seem to work just fine.Can anyone confirm this behavior in their environment?This seems to be a randomly occurring error with curl (only happens with ibiblio.org though):Looks to me like a server configuration issue at ibiblio.org. Probably a loadbalancer with one of the application servers behind it not containing the full cert chain:**When not working:** uli@us02:~$ curl -vs https://distro.ibiblio.org * Rebuilt URL to: https://distro.ibiblio.org/ * Trying 152.19.134.43... * TCP_NODELAY set * Connected to distro.ibiblio.org (152.19.134.43) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs * TLSv1.2 (OUT), TLS handshake, Client hello (1): * TLSv1.2 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (OUT), TLS alert, Server hello (2): * SSL certificate problem: unable to get local issuer certificate * stopped the pause stream! * Closing connection 0 --- uli@us02:~$ echo | openssl s_client -connect distro.ibiblio.org:443 CONNECTED(00000003) depth=0 C = US, postalCode = 27514, ST = NC, L = Chapel HIll, street = 153A Country Club Road, O = University of North Carolina at Chapel Hill, CN = distro.ibiblio.org verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 C = US, postalCode = 27514, ST = NC, L = Chapel HIll, street = 153A Country Club Road, O = University of North Carolina at Chapel Hill, CN = distro.ibiblio.org verify error:num=21:unable to verify the first certificate verify return:1 --- **When working:** uli@us02:~$ curl -vs https://distro.ibiblio.org * Rebuilt URL to: https://distro.ibiblio.org/ * Trying 152.19.134.43... * TCP_NODELAY set * Connected to distro.ibiblio.org (152.19.134.43) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs * TLSv1.2 (OUT), TLS handshake, Client hello (1): * TLSv1.2 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS change cipher, Client hello (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS handshake, Finished (20): * SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384 * ALPN, server accepted to use http/1.1 * Server certificate: * subject: C=US; postalCode=27514; ST=NC; L=Chapel HIll; street=153A Country Club Road; O=University of North Carolina at Chapel Hill; CN=distro.ibiblio.org * start date: Feb 1 00:00:00 2017 GMT * expire date: Feb 1 23:59:59 2020 GMT * subjectAltName: host "distro.ibiblio.org" matched cert's "distro.ibiblio.org" * issuer: C=US; ST=MI; L=Ann Arbor; O=Internet2; OU=InCommon; CN=InCommon RSA Server CA * SSL certificate verify ok. > GET / HTTP/1.1 > Host: distro.ibiblio.org > User-Agent: curl/7.58.0 > Accept: */* > < HTTP/1.1 200 OK < Content-Type: text/html < Content-Length: 19655 < Date: Mon, 20 May 2019 23:14:43 GMT < Server: lighttpd/1.4.53 --- uli@us02:~$ echo | openssl s_client -connect distro.ibiblio.org:443 CONNECTED(00000003) depth=2 C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority verify return:1 depth=1 C = US, ST = MI, L = Ann Arbor, O = Internet2, OU = InCommon, CN = InCommon RSA Server CA verify return:1 depth=0 C = US, postalCode = 27514, ST = NC, L = Chapel HIll, street = 153A Country Club Road, O = University of North Carolina at Chapel Hill, CN = distro.ibiblio.org verify return:1 ---The depends Makefile includes a fallback download path (https://bitcoincore.org/depends-sources), which is probably why the tests are not failing in any case.
- Kemu renamed this:
depends:Enable SSL download of Berkeley DB source
depends: switch to secure download of all dependencies
on May 20, 2019 -
DrahtBot commented at 1:25 AM on May 21, 2019: member
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #15844 (depends: Purge libtool archives by dongcarl)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
-
jonasschnelli commented at 9:01 AM on May 21, 2019: contributor
Thanks. utACK d8bc47fde46ca0711fa54a0d70ff5d066c708e50
- MarcoFalke added the label Needs gitian build on May 21, 2019
-
practicalswift commented at 2:52 PM on May 21, 2019: contributor
Welcome as a contributor @Kemu! :-)
utACK d8bc47fde46ca0711fa54a0d70ff5d066c708e50
-
dongcarl commented at 4:28 PM on May 21, 2019: member
tACK d8bc47fde46ca0711fa54a0d70ff5d066c708e50
-
DrahtBot commented at 12:43 AM on May 22, 2019: member
<!--a722867cd34abeea1fadc8d60700f111-->
Gitian builds for commit 2d1583ee6aff4b68dc46bcb87eb7a85f90b465c3 (master):
f55b412069904711bd300117d7bdc212...bitcoin-0.18.99-osx-unsigned.dmgc21869734ae349430e2d9b68d3c0278d...bitcoin-0.18.99-osx64.tar.gz352aa189594c0f5d2357c6e4f28bb966...bitcoin-0.18.99-win64-debug.zip0b6ed0d02ba5133bd99cfc79d5d413ce...bitcoin-0.18.99-win64-setup-unsigned.exe14a6165ab0f2594aadceea8717c11abc...bitcoin-0.18.99-win64.zip83b4227efbc50aca017907355a81c6f0...bitcoin-core-osx-0.19-res.yml8846699e3ebd9686a22f035d6d11060b...bitcoin-core-win-0.19-res.yml6ed8f8e851a0b9e8a848f40c97925f93...bitcoin-linux-build.logaf43fdb4c90ff38c3996fa15c4eae337...bitcoin-osx-build.loge6496d658405f10cf9897a78dd58d593...bitcoin-win-build.log
Gitian builds for commit e34ec54e9451ccd3cc41a76f9c1be94d01cff21f (master and this pull):
0501e05ce75cd4e27a88c7d109d76471...bitcoin-0.18.99-osx-unsigned.dmg185dc51949c408e96d1d81b9106efcb6...bitcoin-0.18.99-osx64.tar.gzc3f594ca2dc89ec9b740014ea10f53b5...bitcoin-0.18.99-win64-debug.zipf96624787ab80df6ad9eca83ec4d5304...bitcoin-0.18.99-win64-setup-unsigned.exea2409c2db378a79de7af0f22d5e09af9...bitcoin-0.18.99-win64.zip4f0a25de54596cceec798c0077929c0c...bitcoin-core-osx-0.19-res.yml0c61b9d07ed58343057550bdd0b57ecb...bitcoin-core-win-0.19-res.yml35ee77e88ce21e2fc5980d3dc7f1fe9a...bitcoin-linux-build.log0722bc2a58e6a296f919ef9de9cb0937...bitcoin-osx-build.loge732c97c71be1adf5efb807ce0050214...bitcoin-win-build.log
- DrahtBot removed the label Needs gitian build on May 22, 2019
- MarcoFalke merged this on May 22, 2019
- MarcoFalke closed this on May 22, 2019
- MarcoFalke referenced this in commit 953f757677 on May 22, 2019
- zkbot referenced this in commit a96942e809 on Dec 11, 2019
- deadalnix referenced this in commit f568f26f41 on Mar 19, 2020
- ftrader referenced this in commit 074f238ffa on Aug 17, 2020
- Munkybooty referenced this in commit 584f8e14df on Oct 17, 2021
- Munkybooty referenced this in commit dd5faf4f72 on Oct 22, 2021
- Munkybooty referenced this in commit 1db0347f3c on Oct 22, 2021
- Munkybooty referenced this in commit 47bef9e3f8 on Oct 23, 2021
- Munkybooty referenced this in commit 309debe249 on Oct 26, 2021
- Munkybooty referenced this in commit 60ebbdd196 on Oct 28, 2021
- Munkybooty referenced this in commit 4d23c24623 on Oct 28, 2021
- Munkybooty referenced this in commit 69b122d4d9 on Nov 12, 2021
- Munkybooty referenced this in commit e35dc6e017 on Nov 13, 2021
- Munkybooty referenced this in commit 02c59f37d6 on Nov 13, 2021
- Munkybooty referenced this in commit ed8672a8cb on Nov 14, 2021
- Munkybooty referenced this in commit bd4d0dfd1d on Nov 16, 2021
- Munkybooty referenced this in commit 4ea11231fc on Nov 16, 2021
- Munkybooty referenced this in commit 036e260006 on Nov 18, 2021
- Munkybooty referenced this in commit e5817f44a2 on Nov 18, 2021
- MarcoFalke locked this on Dec 16, 2021