aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/cyassl
diff options
context:
space:
mode:
Diffstat (limited to 'package/libs/cyassl')
-rw-r--r--package/libs/cyassl/Makefile71
-rw-r--r--package/libs/cyassl/patches/100-respect_cflags.patch11
-rw-r--r--package/libs/cyassl/patches/300-SSL_set_tlsext_host_name.patch10
-rw-r--r--package/libs/cyassl/patches/400-additional_compatibility.patch16
4 files changed, 108 insertions, 0 deletions
diff --git a/package/libs/cyassl/Makefile b/package/libs/cyassl/Makefile
new file mode 100644
index 0000000..038ef49
--- /dev/null
+++ b/package/libs/cyassl/Makefile
@@ -0,0 +1,71 @@
+#
+# Copyright (C) 2006-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=wolfssl
+PKG_VERSION:=3.6.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
+PKG_SOURCE_URL:=http://www.wolfssl.com/
+PKG_MD5SUM:=fea119ce10c715d3f22514b5b387781e
+
+PKG_FIXUP:=libtool
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+PKG_LICENSE:=GPL-2.0+
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libcyassl
+ SECTION:=libs
+ SUBMENU:=SSL
+ CATEGORY:=Libraries
+ TITLE:=CyaSSL library
+ URL:=http://www.wolfssl.com/
+endef
+
+define Package/libcyassl/description
+CyaSSL is an SSL library optimized for small footprint, both on disk and for
+memory use.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+ --without-zlib \
+ --enable-singlethreaded \
+ --enable-opensslextra \
+ --enable-sni \
+ --enable-ecc \
+ --disable-examples
+
+ifneq ($(CONFIG_TARGET_x86),)
+ CONFIGURE_ARGS += --enable-intelasm
+endif
+ifneq ($(CONFIG_TARGET_x86_64),)
+ CONFIGURE_ARGS += --enable-intelasm
+endif
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.{so*,la} $(1)/usr/lib/
+ ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so
+ ln -s libwolfssl.la $(1)/usr/lib/libcyassl.la
+endef
+
+define Package/libcyassl/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so* $(1)/usr/lib/
+ ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so
+endef
+
+$(eval $(call BuildPackage,libcyassl))
diff --git a/package/libs/cyassl/patches/100-respect_cflags.patch b/package/libs/cyassl/patches/100-respect_cflags.patch
new file mode 100644
index 0000000..94117ae
--- /dev/null
+++ b/package/libs/cyassl/patches/100-respect_cflags.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -47,7 +47,7 @@ AC_SUBST([WOLFSSL_LIBRARY_VERSION])
+
+ # capture user C_EXTRA_FLAGS from ./configure line, CFLAGS may hold -g -O2 even
+ # if user doesn't override, no way to tell
+-USER_C_EXTRA_FLAGS="$C_EXTRA_FLAGS"
++USER_C_EXTRA_FLAGS="$CFLAGS"
+
+ LT_PREREQ([2.2])
+ LT_INIT([disable-static],[win32-dll])
diff --git a/package/libs/cyassl/patches/300-SSL_set_tlsext_host_name.patch b/package/libs/cyassl/patches/300-SSL_set_tlsext_host_name.patch
new file mode 100644
index 0000000..00a23fe
--- /dev/null
+++ b/package/libs/cyassl/patches/300-SSL_set_tlsext_host_name.patch
@@ -0,0 +1,10 @@
+--- a/wolfssl/openssl/ssl.h
++++ b/wolfssl/openssl/ssl.h
+@@ -397,6 +397,7 @@ typedef WOLFSSL_X509_STORE_CTX X509_STOR
+ /* yassl had set the default to be 500 */
+ #define SSL_get_default_timeout(ctx) 500
+
++#define SSL_set_tlsext_host_name(x, y) wolfSSL_UseSNI(x, WOLFSSL_SNI_HOST_NAME, y, strlen(y))
+
+ #ifdef __cplusplus
+ } /* extern "C" */
diff --git a/package/libs/cyassl/patches/400-additional_compatibility.patch b/package/libs/cyassl/patches/400-additional_compatibility.patch
new file mode 100644
index 0000000..07956f1
--- /dev/null
+++ b/package/libs/cyassl/patches/400-additional_compatibility.patch
@@ -0,0 +1,16 @@
+--- a/cyassl/openssl/ssl.h
++++ b/cyassl/openssl/ssl.h
+@@ -24,4 +24,13 @@
+ *
+ */
+
++#ifndef CYASSL_OPENSSL_H_
++#define CYASSL_OPENSSL_H_
++
++#include <cyassl/ssl.h>
++#ifndef HAVE_SNI
++#undef CYASSL_SNI_HOST_NAME
++#endif
+ #include <wolfssl/openssl/ssl.h>
++
++#endif