Stop building FDBLibTLS and stop linking against libtls.so

Which now means OpenSSL and LibreSSL are equally acceptable.
This commit is contained in:
Alex Miller 2020-02-06 21:13:58 -08:00
parent e390dbd36c
commit 6b921ac900
2 changed files with 12 additions and 21 deletions

View File

@ -110,8 +110,8 @@ CFLAGS += -DTLS_DISABLED
FDB_TLS_LIB :=
TLS_LIBS :=
else
FDB_TLS_LIB := lib/libFDBLibTLS.a
TLS_LIBS += $(addprefix $(TLS_LIBDIR)/,libtls.a libssl.a libcrypto.a)
FDB_TLS_LIB :=
TLS_LIBS += $(addprefix $(TLS_LIBDIR)/,libssl.a libcrypto.a)
endif
CXXFLAGS += -Wno-deprecated -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED
@ -124,9 +124,6 @@ VPATH += $(addprefix :,$(filter-out lib,$(patsubst -L%,%,$(filter -L%,$(LDFLAGS)
CS_PROJECTS := flow/actorcompiler flow/coveragetool fdbclient/vexillographer
CPP_PROJECTS := flow fdbrpc fdbclient fdbbackup fdbserver fdbcli bindings/c bindings/java fdbmonitor bindings/flow/tester bindings/flow
ifndef TLS_DISABLED
CPP_PROJECTS += FDBLibTLS
endif
OTHER_PROJECTS := bindings/python bindings/ruby bindings/go
CS_MK_GENERATED := $(CS_PROJECTS:=/generated.mk)

View File

@ -18,27 +18,21 @@
* limitations under the License.
*/
#ifndef _FLOW_LOADPLUGIN_H_
#define _FLOW_LOADPLUGIN_H_
#pragma once
// Specialized TLS plugin library
extern "C" void *get_tls_plugin(const char *plugin_type_name_and_version);
// Name of specialized TLS Plugin
extern const char* tlsPluginName;
#include <string>
#include "flow/flow.h"
template <class T>
Reference<T> loadPlugin( std::string const& plugin_name ) {
void *(*get_plugin)(const char*) = NULL;
#ifndef TLS_DISABLED
if (!plugin_name.compare(tlsPluginName)) {
get_plugin = (void*(*)(const char*)) get_tls_plugin;
}
else
#endif
{
void* plugin = loadLibrary( plugin_name.c_str() );
if (plugin)
get_plugin = (void*(*)(const char*))loadFunction( plugin, "get_plugin" );
}
void* plugin = loadLibrary( plugin_name.c_str() );
if (plugin)
get_plugin = (void*(*)(const char*))loadFunction( plugin, "get_plugin" );
return (get_plugin) ? Reference<T>( (T*)get_plugin( T::get_plugin_type_name_and_version() ) ) : Reference<T>( NULL );
}
#endif