21 Commits

Author SHA1 Message Date
sfc-gh-tclinkenbeard
a71099471b Update copyright header dates 2022-03-21 13:36:23 -07:00
Markus Pilman
8b77c8d79a Remove unused OpenSSL code 2022-01-11 10:34:37 -08:00
A.J. Beamon
a51988ff3a Refactor our PRIVATE_EXCEPT_FOR_TLSCONFIG_CPP macro to be compatible with clang-format. Remove one use of it that is no longer needed now that actors can access private members. 2021-08-27 16:41:45 -07:00
Cynthia
f8054b82de fdbcli prints error on TLS File not found 2021-04-19 22:25:19 -06:00
FDB Formatster
df90cc89de apply clang-format to *.c, *.cpp, *.h, *.hpp files 2021-03-10 10:18:07 -08:00
Steve Atherton
76a4293d1d Merge branch 'release-6.3'
# Conflicts:
#	fdbserver/fdbserver.actor.cpp
2021-02-15 02:13:06 -08:00
Russell Sears
a56184c0b7 log TLSVerifyFailure as a warning (severity 20) since it generally indicates a miconfiguration or important network problem 2021-02-08 22:01:48 +00:00
A.J. Beamon
aaf0a9aa7b Merge branch 'release-6.3' into merge-release-6.3-into-master
# Conflicts:
#	build/docker-compose.yaml
#	cmake/ConfigureCompiler.cmake
#	fdbclient/FileBackupAgent.actor.cpp
#	fdbrpc/AsyncFileCached.actor.h
#	fdbrpc/IAsyncFile.h
#	fdbrpc/IRateControl.h
#	fdbrpc/simulator.h
#	fdbserver/KeyValueStoreSQLite.actor.cpp
#	fdbserver/storageserver.actor.cpp
#	fdbservice/ServiceBase.cpp
2021-02-08 12:58:34 -08:00
A.J. Beamon
67e783acf8 Merge branch 'release-6.2' into merge-release-6.2-into-release-6.3
# Conflicts:
#	cmake/CompileBoost.cmake
#	cmake/FDBComponents.cmake
#	fdbrpc/AsyncFileCached.actor.h
#	fdbrpc/simulator.h
#	fdbserver/KeyValueStoreSQLite.actor.cpp
#	fdbserver/Knobs.cpp
#	fdbserver/Knobs.h
#	fdbserver/storageserver.actor.cpp
#	flow/Knobs.h
#	flow/network.h
2021-02-08 09:20:28 -08:00
Russell Sears
589eaf54d7 Switch to BoringSSL by default 2021-01-22 20:39:12 +00:00
sfc-gh-tclinkenbeard
4669f837fa Add uses of makeReference 2020-11-07 22:10:18 -08:00
sfc-gh-tclinkenbeard
0ac08f6a9b Replace NULL with nullptr in flow 2020-09-20 11:31:49 -07:00
A.J. Beamon
6f4d6f1923 Refreshing TLS files was done to an incorrect location that resulted in random memory being wiped out. Also fixed a typo that loaded the key bytes into the CA bytes in some cases. 2020-06-12 14:40:10 -07:00
tclinken
eaad516f3a Removed const_cast from readEntireFile 2020-05-13 19:59:35 -07:00
Alex Miller
94b4f78ea9 Fix clients crashing in TLS code on exit.
If client code initiates an FDB operation to a TLS cluster, and then
immediately exits the main thread, then OpenSSL's atexit handler would
potentially run while the network thread is attempting to do TLS
operations, and thus crash.

This commit removes the OpenSSL atexit hander, and instead relies on a
client intentionally ending the network thread to do TLS cleanup.  If
the client code exits without stopping the network thread, then we'll
never free OpenSSL data structures, which is the safer thing to do.
2020-04-18 15:48:02 -07:00
Alex Miller
db5863145a Merge remote-tracking branch 'upstream/release-6.2' into fdbcli-tlsinfo 2020-03-16 12:33:50 -07:00
Alex Miller
a5568b2fc6 Rewrite tlsinfo into --debug-tls, and print out configuration. 2020-03-13 15:46:03 -07:00
Alex Miller
0c558efcfe Add a tlsinfo command to fdbcli that prints the certificate chain.
This requires the certificate chain to load successfully, otherwise
fdbcli will error out at an earlier point due to Net2 not being able to
configure TLS.
2020-03-13 00:11:53 -07:00
Alex Miller
1f56bf8933
Fix the build with success()
Co-Authored-By: A.J. Beamon <ajbeamon@users.noreply.github.com>
2020-03-06 10:15:04 -08:00
Alex Miller
ac52b6b474 Rework a bit of error and exception handling.
I went back and dug through all of the "what functions can throw what
types", and made sane decisions about them.  boost errors are
aggressively translated into FDB ones, whcih might result in multiple
lines of logging about errors, but this is in infrequently run code, so
it should be fine.
2020-03-06 02:33:16 -08:00
Alex Miller
9b5ef3416e Refactor TLSParams into TLSConfig + LoadedTLSConfig
The idea being that we keep around a TLSConfig that the configuration
that the user has provided, and then when we want to intialize an SSL
context, we ask the TLSConfig to load all certificates and return us a
LoadedTLSConfig that is a concrete set of certificate bytes in memory.

initTLS now just takes the in-memory bytes and applies them to the ssl
context.

This is a large refactor to lead up into certificate refeshing, where we
will periodically check for changes to the certificates, and then
re-load them and apply them to a new SSL context.
2020-03-04 20:14:47 -08:00