I can confirm the 100-sizeof_long_long.patch patch for curl provided by
Massimo does work fine for me under ar71xx and atheros platforms. That is,
I can now successfully have libcurl link to cyassl instead of openssl.
What additional steps are needed to close this thread, specifically to
update the cyassl Makefile to pull version 2.6.0?
On Thu, May 23, 2013 at 3:17 PM, Massimo Vellucci vema...@gmail.com wrote:
Hi,
sorry for the delay, I found the problem about the curl library. There
is a bug in configure.ac file of curl package.
You have to add the file 100-sizeof_long_long.patch in the
pathtrunk/feeds/packages/libs/curl/patches
diff -u a/configure.ac b/configure.ac
--- a/configure.ac 2013-02-06 10:47:19.0 +0100
+++ b/configure.ac 2013-05-23 22:00:59.233980076 +0200
@@ -2928,6 +2928,7 @@
AC_CHECK_SIZEOF(size_t)
AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(short)
CURL_CONFIGURE_LONG
Curl did not determine the size of the type long long that is a value
necessary to CyaSSL.
My libs/curl/Makefile
--- libs/curl/Makefile
+++ libs/curl/Makefile
@@ -43,7 +43,7 @@
$(call Package/curl/Default)
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libopenssl +zlib
+ DEPENDS:=+libcyassl +zlib
TITLE:=A client-side URL transfer library
endef
@@ -70,7 +70,8 @@
--enable-tftp \
--disable-verbose \
--with-random=/dev/urandom \
---with-ssl=$(STAGING_DIR)/usr \
+--with-cyassl=$(STAGING_DIR)/usr \
+--without-ssl
--without-ca-bundle \
--without-gnutls \
--without-krb4 \
@@ -81,7 +82,7 @@
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
CONFIGURE_VARS += \
-LIBS=-lcrypto -lssl -lz \
+LIBS=-lcyassl -lz \
CC=$(filter-out ccache,$(TARGET_CC))
With these settings I was able to compile curl for atheros 71xx
Bye
Massimo
2013/5/21 Massimo Vellucci vema...@gmail.com
I'm sorry but these days I have been very busy with work. I have not
found the time to do the tests.
I would like to remove OpenSSL from my application that I am developing and
using CyaSSL.
The problem of porting applications from OpenSSL to CyaSSL is requires a
lot of work. The two libraries are not compatible 100%
2013/5/21 Ben West b...@gowasabi.net
For an update, I have since been able to get libcurl to link to the new
cyassl package, provided I explicitly insert sizeof_long definitions into
libcurl header files, shown in the patch below. It is unusual that libcurl
seems to require these additional defines to link to libcyassl.so, but
uhttpd-mod-tls does not.
I'm not sure if this patch resides properly with the package curl,
perhaps accompanied by another patch that defines a new sub-package
libcurl-cyassl.
Massimo, are you using the newer version of cyassl for anything besides
uhttpd?
--- curl-7.29.0/include/curl/curl.h.201305182013-05-17
23:25:23.816083944 -0500
+++ curl-7.29.0/include/curl/curl.h2013-05-17 23:30:43.304082086
-0500
@@ -118,6 +118,13 @@ typedef void CURL;
#endif
#endif
+/* These definitions needed for cyassl */
+/* The size of `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* The size of `long long', as computed by sizeof. */
+#define SIZEOF_LONG_LONG 8
+
#ifndef curl_socket_typedef
/* socket typedef */
#if defined(WIN32) !defined(__LWIP_OPT_H__)
On Fri, May 17, 2013 at 12:00 PM, Ben West b...@gowasabi.net wrote:
Thank you for responding. Below is the diff of the curl Makefile,
against that included in the Attitude Adjustment v12.09 packages
herehttps://dev.openwrt.org/browser/branches/packages_12.09/libs/curl/Makefile
.
Note that the addition of -lm to libraries for curl to link to came
from my own research in pending OpenWRT issues about compiling curl with
cyassl. However, the error about long long size mismatch occurs whether
libm.so is included or not.
Index: libs/curl/Makefile
===
--- libs/curl/Makefile(revision 36652)
+++ libs/curl/Makefile(working copy)
@@ -43,7 +43,7 @@
$(call Package/curl/Default)
SECTION:=libs
CATEGORY:=Libraries
- DEPENDS:=+libopenssl +zlib
+ DEPENDS:=+libcyassl +zlib
TITLE:=A client-side URL transfer library
endef
@@ -70,7 +70,8 @@
--enable-tftp \
--disable-verbose \
--with-random=/dev/urandom \
---with-ssl=$(STAGING_DIR)/usr \
+--with-cyassl=$(STAGING_DIR)/usr \
+--without-ssl
--without-ca-bundle \
--without-gnutls \
--without-krb4 \
@@ -81,7 +82,7 @@
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
CONFIGURE_VARS += \
-LIBS=-lcrypto -lssl -lz \
+LIBS=-lm -lcyassl -lz \
CC=$(filter-out ccache,$(TARGET_CC))
define Build/Compile
On Fri, May 17, 2013 at 2:10 AM, Massimo Vellucci vema...@gmail.comwrote:
CyaSSL must determine the environment to recognize the size of