Skip to content

Commit 2065ef6

Browse files
committed
Merge #17265: Remove OpenSSL
e5a0bec doc: add OpenSSL removal to release-notes.md (fanquake) 397dbae ci: remove OpenSSL installation (fanquake) a4eb839 doc: remove OpenSSL from build instructions and licensing info (fanquake) 648b2e3 depends: remove OpenSSL package (fanquake) 8983ee3 build: remove OpenSSL detection and libs (fanquake) b49b6b0 random: Remove remaining OpenSSL calls and locking infrastructure (fanquake) 4fcfcc2 random: stop retrieving random bytes from OpenSSL (fanquake) 5624ab0 random: stop feeding RNG output back into OpenSSL (fanquake) Pull request description: Now that #17165 has been merged, removing our remaining OpenSSL usage is possible. That remaining usage was a call to [`RAND_bytes`](https://www.openssl.org/docs/manmaster/man3/RAND_bytes.html) during the ::SLOW path of [ProcRand](https://github.com/bitcoin/bitcoin/blob/master/src/random.cpp#L616). As well as feeding output from our RNG back into OpenSSL via [`RAND_add`](https://www.openssl.org/docs/manmaster/man3/RAND_add.html) during the ::SLOW and ::SLEEP paths. Optimistically tagged for `0.20.0`. Needs discussion, potentially in an upcoming weekly meeting? Closes #12530. ACKs for top commit: MarcoFalke: ACK e5a0bec laanwj: ACK e5a0bec Tree-SHA512: 02fce08ec91d20e0da51e9314eec53dcf8699cded02f0a005417d627520c20b826332cb42bdae132af283d4903aa3088a9f613f3aea915d655a51532a4d4796c
2 parents 3052130 + e5a0bec commit 2065ef6

28 files changed

+22
-209
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ task:
1616
ccache_cache:
1717
folder: "/tmp/ccache_dir"
1818
install_script:
19-
- pkg install -y autoconf automake boost-libs git gmake libevent libtool openssl pkgconf python3 ccache
19+
- pkg install -y autoconf automake boost-libs git gmake libevent libtool pkgconf python3 ccache
2020
- ./contrib/install_db4.sh $(pwd)
2121
- ccache --max-size=${CCACHE_SIZE}
2222
configure_script:

build_msvc/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Quick Start
1212
The minimal steps required to build Bitcoin Core with the msbuild toolchain are below. More detailed instructions are contained in the following sections.
1313

1414
```
15-
vcpkg install --triplet x64-windows-static boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent openssl zeromq berkeleydb rapidcheck double-conversion
15+
vcpkg install --triplet x64-windows-static boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent zeromq berkeleydb rapidcheck double-conversion
1616
py -3 build_msvc\msvc-autogen.py
1717
msbuild /m build_msvc\bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build
1818
```
@@ -33,7 +33,6 @@ The [external dependencies](https://github.com/bitcoin/bitcoin/blob/master/doc/d
3333
- Boost
3434
- DoubleConversion
3535
- libevent
36-
- OpenSSL
3736
- Qt5
3837
- RapidCheck
3938
- ZeroMQ

build_msvc/vcpkg-packages.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
berkeleydb boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent openssl rapidcheck zeromq double-conversion
1+
berkeleydb boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent rapidcheck zeromq double-conversion

ci/test/04_install.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
2525
done
2626

2727
export PATH="/usr/local/opt/ccache/libexec:$PATH"
28-
OPENSSL_PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"
29-
export PKG_CONFIG_PATH=$OPENSSL_PKG_CONFIG_PATH:$PKG_CONFIG_PATH
3028

3129
${CI_RETRY_EXE} pip3 install $PIP_PACKAGES
3230

configure.ac

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -555,13 +555,8 @@ case $host in
555555
dnl It's safe to add these paths even if the functionality is disabled by
556556
dnl the user (--without-wallet or --without-gui for example).
557557

558-
openssl_prefix=`$BREW --prefix openssl 2>/dev/null`
559558
bdb_prefix=`$BREW --prefix berkeley-db4 2>/dev/null`
560559
qt5_prefix=`$BREW --prefix qt5 2>/dev/null`
561-
if test x$openssl_prefix != x; then
562-
PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
563-
export PKG_CONFIG_PATH
564-
fi
565560
if test x$bdb_prefix != x; then
566561
CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
567562
LIBS="$LIBS -L$bdb_prefix/lib"
@@ -1255,7 +1250,6 @@ if test x$use_pkgconfig = xyes; then
12551250
m4_ifdef(
12561251
[PKG_CHECK_MODULES],
12571252
[
1258-
PKG_CHECK_MODULES([CRYPTO], [libcrypto],,[AC_MSG_ERROR(libcrypto not found.)])
12591253
if test x$use_qr != xno; then
12601254
BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
12611255
fi
@@ -1278,8 +1272,6 @@ if test x$use_pkgconfig = xyes; then
12781272
]
12791273
)
12801274
else
1281-
AC_CHECK_HEADER([openssl/crypto.h],,AC_MSG_ERROR(libcrypto headers missing))
1282-
AC_CHECK_LIB([crypto], [main],CRYPTO_LIBS=-lcrypto, AC_MSG_ERROR(libcrypto missing))
12831275

12841276
if test x$build_bitcoin_cli$build_bitcoind$bitcoin_enable_qt$use_tests != xnononono; then
12851277
AC_CHECK_HEADER([event2/event.h],, AC_MSG_ERROR(libevent headers missing),)
@@ -1599,7 +1591,6 @@ AC_SUBST(TESTDEFS)
15991591
AC_SUBST(LEVELDB_TARGET_FLAGS)
16001592
AC_SUBST(MINIUPNPC_CPPFLAGS)
16011593
AC_SUBST(MINIUPNPC_LIBS)
1602-
AC_SUBST(CRYPTO_LIBS)
16031594
AC_SUBST(EVENT_LIBS)
16041595
AC_SUBST(EVENT_PTHREADS_LIBS)
16051596
AC_SUBST(ZMQ_LIBS)

depends/packages/openssl.mk

Lines changed: 0 additions & 88 deletions
This file was deleted.

depends/packages/packages.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
packages:=boost openssl libevent
1+
packages:=boost libevent
22

33
qt_packages = qrencode zlib
44

depends/patches/openssl/0001-Add-OpenSSL-termios-fix-for-musl-libc.patch

Lines changed: 0 additions & 17 deletions
This file was deleted.

doc/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,3 @@ The Bitcoin repo's [root README](/README.md) contains relevant information on th
8484
License
8585
---------------------
8686
Distributed under the [MIT software license](/COPYING).
87-
This product includes software developed by the OpenSSL Project for use in the [OpenSSL Toolkit](https://www.openssl.org/). This product includes
88-
cryptographic software written by Eric Young ([[email protected]](mailto:[email protected])), and UPnP software written by Thomas Bernard.

doc/build-freebsd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This guide does not contain instructions for building the GUI.
1111
You will need the following dependencies, which can be installed as root via pkg:
1212

1313
```shell
14-
pkg install autoconf automake boost-libs git gmake libevent libtool openssl pkgconf
14+
pkg install autoconf automake boost-libs git gmake libevent libtool pkgconf
1515

1616
git clone https://github.com/bitcoin/bitcoin.git
1717
```

0 commit comments

Comments
 (0)