libcapwap can be compiled w/o openssl

FossilOrigin-Name: 35e5f3fa0b4706ac68d48e11bbe7e6168a61d5dd6836c96ba5532c5b3c92511c
This commit is contained in:
7u83@mail.ru 2015-02-08 11:35:34 +00:00
parent 2c4f97f453
commit 691111f04d
5 changed files with 41 additions and 26 deletions

View File

@ -1,4 +1,4 @@
include ../Config.mak include ../Config.mak
WITH_GNUTLS=1 WITH_GNUTLS=1
WITH_OPENSSL=1 WITH_OPENSSL=0

View File

@ -1,26 +1,22 @@
#Define SSL Library: OPENSSL or GNUTLS (GNUTLS not supported for now) #
#SSL_LIBRARY=OPENSSL # OpenSSL definitions
SSL_LIBRARY=GNUTLS #
# use openssl library in ../contrib/
OPENSSL_VERSION=openssl-1.0.1i
USE_CONTRIB_OPENSSL=1
#OPENSSL_VERSION=openssl-1.0.1l # doesn't work #OPENSSL_VERSION=openssl-1.0.1l # doesn't work
#OPENSSL_VERSION=openssl-1.0.2 # doesn't work #OPENSSL_VERSION=openssl-1.0.2 # doesn't work
OPENSSL_VERSION=openssl-1.0.1i
USE_CONTRIB_OPENSSL=1
# use gnutls lib in ../contrib/ # GnuTLS definitions
GNUTLS_VERSION=3.3.9 GNUTLS_VERSION=3.3.9
USE_CONTRIB_GNUTLS=1 USE_CONTRIB_GNUTLS=1
CONF_LIBRARY=UCI # Compiler to use
USE_CONTRIB_UCI=0
CC=clang CC=clang
#CC=mips-openwrt-linux-uclibc-gcc #CC=mips-openwrt-linux-uclibc-gcc
#LD=mips-openwrt-linux-uclibc-ld #LD=mips-openwrt-linux-uclibc-ld
#AR=mips-openwrt-linux-uclibc-ar #AR=mips-openwrt-linux-uclibc-ar

View File

@ -1,8 +1,20 @@
#
#SSL settings
SSL_LIBRARY=OPENSSL
USE_CONTRIB_OPENSSL=1 USE_CONTRIB_OPENSSL=1
# C compiler settings
CC=clang CC=clang
CFLAGS += -I/usr/include/libnl3 CFLAGS += -I/usr/include/libnl3
CFLAGS += -I../contrib/uci CFLAGS += -I../contrib/uci
LDFLAGS += -L../contrib/uci/build LDFLAGS += -L../contrib/uci/build
LDFLAGS += -L../contrib/libubox/build LDFLAGS += -L../contrib/libubox/build
CONF_LIBRARY=UCI
USE_CONTRIB_UCI=0

View File

@ -1,5 +1,5 @@
include ../Config.mak include ../ACConfig.mak
include ../Macros.mak include ../Macros.mak
ifndef CC ifndef CC

View File

@ -1,4 +1,4 @@
include ../Config.mak include ../CapwapConfig.mak
include ../Macros.mak include ../Macros.mak
ifndef CC ifndef CC
@ -13,9 +13,7 @@ ifndef ARCH
ARCH = $(shell $(CC) -dumpmachine) ARCH = $(shell $(CC) -dumpmachine)
endif endif
ifdef INCLUDE_DIR
XINCLUDE = -I $(INCLUDE_DIR)
endif
#OPENSSLINC=$(OPENSSLINC) #OPENSSLINC=$(OPENSSLINC)
#../contrib/openssl-1.0.1i/include #../contrib/openssl-1.0.1i/include
@ -134,23 +132,32 @@ CAPWAPOBJS= \
lw_checksum.o lw_checksum.o
# cwsend_image_data_request.o # cwsend_image_data_request.o
# cwmsg_set_control_header.o # cwmsg_set_control_header.o
# process_msgelems.o \ # process_msgelems.o \
#
# SSL objects
#
DTLSOBJS= \ ifeq ($(WITH_OPENSSL),1)
dtls_openssl.o \ CFLAGS+=$(OPENSSL_CFLAGS)
CFLAGS+=-DWITH_OPENSSL
DTLSOBJS += dtls_openssl.o \
dtls_openssl_accept.o \ dtls_openssl_accept.o \
dtls_openssl_connect.o \ dtls_openssl_connect.o \
dtls_openssl_get_cipher.o \ dtls_openssl_get_cipher.o \
dtls_openssl_bio.o \ dtls_openssl_bio.o
dtls_gnutls.o \ endif
ifeq ($(WITH_GNUTLS),1)
CFLAGS+=$(GNUTLS_CFLAGS)
CFLAGS+=-DWITH_GNUTLS
DTLSOBJS+= dtls_gnutls.o \
dtls_gnutls_accept.o \ dtls_gnutls_accept.o \
dtls_bio.o \ dtls_bio.o \
dtls_gnutls_bio.o dtls_gnutls_bio.o
endif
CONNOBJS= conn.o \ CONNOBJS= conn.o \
conn_detect_capwap.o \ conn_detect_capwap.o \