forked from Telodendria/Telodendria
Add TLS build support to td.
This commit is contained in:
parent
996356832e
commit
6561b5bae1
2 changed files with 21 additions and 2 deletions
|
@ -2,8 +2,11 @@
|
||||||
#define TELODENDRIA_TLS_H
|
#define TELODENDRIA_TLS_H
|
||||||
|
|
||||||
#define TLS_LIBRESSL 1
|
#define TLS_LIBRESSL 1
|
||||||
#define TLS_MBEDTLS 2
|
|
||||||
#define TLS_OPENSSL 3
|
/*
|
||||||
|
* Other TLS_* macros can be declared here as support
|
||||||
|
* for other implementations is added.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <Stream.h>
|
#include <Stream.h>
|
||||||
|
|
||||||
|
|
16
tools/bin/td
16
tools/bin/td
|
@ -32,6 +32,22 @@
|
||||||
|
|
||||||
. "$(pwd)/tools/lib/common.sh"
|
. "$(pwd)/tools/lib/common.sh"
|
||||||
|
|
||||||
|
if [ -n "$TLS_IMPL" ]; then
|
||||||
|
case "$TLS_IMPL" in
|
||||||
|
"TLS_LIBRESSL")
|
||||||
|
TLS_LIBS="-ltls -lcrypto -lssl"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unrecognized TLS implementation: ${TLS_IMPL}"
|
||||||
|
echo "Consult src/include/Tls.h for supported implementations."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
DEFINES="${DEFINES} -DTLS_IMPL=${TLS_IMPL}"
|
||||||
|
LDFLAGS="${LDFLAGS} ${TLS_LIBS}"
|
||||||
|
fi
|
||||||
|
|
||||||
CFLAGS="${CFLAGS} ${DEFINES} ${INCLUDES}"
|
CFLAGS="${CFLAGS} ${DEFINES} ${INCLUDES}"
|
||||||
LDFLAGS="${LDFLAGS} ${STATIC}"
|
LDFLAGS="${LDFLAGS} ${STATIC}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue