curl: fix polarssl 1.3 compatibility
authorFelix Fietkau <nbd@openwrt.org>
Sat, 15 Mar 2014 09:05:26 +0000 (09:05 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 15 Mar 2014 09:05:26 +0000 (09:05 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 39931

libs/curl/patches/300-polarssl_compat.patch [new file with mode: 0644]

diff --git a/libs/curl/patches/300-polarssl_compat.patch b/libs/curl/patches/300-polarssl_compat.patch
new file mode 100644 (file)
index 0000000..47b600f
--- /dev/null
@@ -0,0 +1,36 @@
+--- a/lib/urldata.h
++++ b/lib/urldata.h
+@@ -117,6 +117,9 @@
+ #include <polarssl/entropy.h>
+ #include <polarssl/ctr_drbg.h>
+ #endif /* POLARSSL_VERSION_NUMBER<0x01010000 */
++#if POLARSSL_VERSION_NUMBER>=0x01030000
++#include <polarssl/compat-1.2.h>
++#endif
+ #endif /* USE_POLARSSL */
+ #ifdef USE_CYASSL
+--- a/lib/vtls/polarssl.c
++++ b/lib/vtls/polarssl.c
+@@ -37,6 +37,10 @@
+ #include <polarssl/x509.h>
+ #include <polarssl/version.h>
++#if POLARSSL_VERSION_NUMBER >= 0x01030000
++#include <polarssl/compat-1.2.h>
++#endif
++
+ #if POLARSSL_VERSION_NUMBER >= 0x01000000
+ #include <polarssl/error.h>
+ #endif /* POLARSSL_VERSION_NUMBER >= 0x01000000 */
+@@ -311,8 +315,8 @@ polarssl_connect_step1(struct connectdat
+                    &connssl->crl,
+                    conn->host.name);
+-  ssl_set_own_cert(&connssl->ssl,
+-                   &connssl->clicert, &connssl->rsa);
++  ssl_set_own_cert_rsa(&connssl->ssl,
++                       &connssl->clicert, &connssl->rsa);
+   if(!Curl_inet_pton(AF_INET, conn->host.name, &addr) &&
+ #ifdef ENABLE_IPV6