Merge branch 'tls-kdh' of https://github.com/arpa2/tlspool into tls-kdh
authorRick van Rein <rick@openfortress.nl>
Mon, 17 Oct 2016 22:02:01 +0000 (23:02 +0100)
committerRick van Rein <rick@openfortress.nl>
Mon, 17 Oct 2016 22:02:01 +0000 (23:02 +0100)
Conflicts:
tool/get_localid.c

src/Makefile
src/starttls.c
tool/get_localid.c

index f61f140..a564a57 100644 (file)
@@ -6,7 +6,6 @@ OBJS = daemon.o config.o manage.o service.o cache.o pinentry.o lidentry.o \
 
 CFLAGS += -pthread -I ../include -std=gnu11
 CFLAGS += $(GNUTLS_CFLAGS) $(P11KIT_CFLAGS) $(BDB_CFLAGS) $(TASN1_CFLAGS) $(UNBOUND_CFLAGS) $(QUICKDER_CFLAGS)
-CFLAGS += -O0 -ggdb3
 
 LDFLAGS += -std=gnu11
 
@@ -47,6 +46,15 @@ endif
 
 PKG_CONFIG ?= pkg-config
 
+ifdef WINVER
+CFLAGS += -D_WIN32_WINNT=0x0600 -DATTRIBUTE_UNUSED="" -I ../include/windows
+OBJS += windows/syslog.o windows/windows.o windows/getopt.o
+LIBS += -lkernel32 -ladvapi32 -lmsvcrt -lwsock32 -lws2_32
+EXE = .exe
+endif
+
+PKG_CONFIG ?= pkg-config
+
 SBIN ?= sbin
 
 BDB_CFLAGS = 
@@ -56,6 +64,16 @@ else
 BDB_LIBS   = -ldb # this is the default
 endif
 
+TASN1_CFLAGS = $(shell pkg-config --cflags libtasn1)
+TASN1_LIBS   = $(shell pkg-config --libs   libtasn1)
+#HOWTOUSE# UNBOUND_FLAGS = $(shell pkg-config --cflags libunbound)
+#HOWTOUSE# UNBOUBD_LIBS  = $(shell pkg-config --libs   libunbound)
+QUICKDER_CFLAGS = $(shell pkg-config --cflags quick-der)
+QUICKDER_LIBS = $(shell pkg-config --libs quick-der)
+KERBEROS_CFLAGS = $(shell krb5-config --cflags)
+KERBEROS_LIBS = $(shell krb5-config --libs)
+# CFLAGS += -DHAVE_TLS_KDH
+
 all: $(TARGETS)
 
 tlspool$(EXE): $(OBJS)
index f07fbd8..2383dbb 100644 (file)
@@ -57,6 +57,8 @@ typedef DER_OVLY_rfc4120_EncryptedData encrypted_data_t;
 #include <sys/types.h>
 #include <sys/socket.h>
 
+#include <krb5.h>
+
 #ifndef __MINGW64__
 #include <arpa/inet.h>
 #endif
index 4bd3bdf..665a7b2 100644 (file)
@@ -45,6 +45,7 @@ struct typemap_t typemap [] = {
        { "X.509",      1 },
        { "OpenPGP",    2 },
        { "Kerberos",   4 },
+       { "krb5",       4 },
        { "valexp",     5 },
        { "client",     256 },
        { "server",     512 },