aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd A Ouska <todd@yassl.com>2011-03-08 13:54:58 +0100
committerDaniel Stenberg <daniel@haxx.se>2011-03-08 13:54:58 +0100
commit9e60d8fd9e9308cd2c79a13710f30a8481f5f1e6 (patch)
tree5bbc49d1bd2812c3e7079c3a019f1e6f9c1bb1e9 /lib
parenta8f30fa555df6ac818fc113163579856b317826d (diff)
SSL: (part 2) Added CyaSSL to SSL abstraction layer
This is the modified existing files commit.
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.inc4
-rw-r--r--lib/http.c2
-rw-r--r--lib/setup.h2
-rw-r--r--lib/sslgen.c2
-rw-r--r--lib/urldata.h9
5 files changed, 15 insertions, 4 deletions
diff --git a/lib/Makefile.inc b/lib/Makefile.inc
index c749168f3..a71900bcf 100644
--- a/lib/Makefile.inc
+++ b/lib/Makefile.inc
@@ -21,7 +21,7 @@ CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c \
socks_gssapi.c socks_sspi.c curl_sspi.c slist.c nonblock.c \
curl_memrchr.c imap.c pop3.c smtp.c pingpong.c rtsp.c curl_threads.c \
warnless.c hmac.c polarssl.c curl_rtmp.c openldap.c curl_gethostname.c\
- gopher.c axtls.c idn_win32.c http_negotiate_sspi.c
+ gopher.c axtls.c idn_win32.c http_negotiate_sspi.c cyassl.c
HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h \
@@ -36,5 +36,5 @@ HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h slist.h nonblock.h \
curl_memrchr.h imap.h pop3.h smtp.h pingpong.h rtsp.h curl_threads.h \
warnless.h curl_hmac.h polarssl.h curl_rtmp.h curl_gethostname.h \
- gopher.h axtls.h
+ gopher.h axtls.h cyassl.h
diff --git a/lib/http.c b/lib/http.c
index 121b7b2a9..807bbeb84 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -1850,7 +1850,7 @@ static int https_getsock(struct connectdata *conn,
}
#else
#if defined(USE_NSS) || defined(USE_QSOSSL) || \
- defined(USE_POLARSSL) || defined(USE_AXTLS)
+ defined(USE_POLARSSL) || defined(USE_AXTLS) || defined(USE_CYASSL)
static int https_getsock(struct connectdata *conn,
curl_socket_t *socks,
int numsocks)
diff --git a/lib/setup.h b/lib/setup.h
index 68c09a091..477d4690b 100644
--- a/lib/setup.h
+++ b/lib/setup.h
@@ -551,7 +551,7 @@ int netware_init(void);
#define LIBIDN_REQUIRED_VERSION "0.4.1"
-#if defined(USE_GNUTLS) || defined(USE_SSLEAY) || defined(USE_NSS) || defined(USE_QSOSSL) || defined(USE_POLARSSL) || defined(USE_AXTLS)
+#if defined(USE_GNUTLS) || defined(USE_SSLEAY) || defined(USE_NSS) || defined(USE_QSOSSL) || defined(USE_POLARSSL) || defined(USE_AXTLS) || defined(USE_CYASSL)
#define USE_SSL /* SSL support has been enabled */
#endif
diff --git a/lib/sslgen.c b/lib/sslgen.c
index c1a8a3073..b614e086d 100644
--- a/lib/sslgen.c
+++ b/lib/sslgen.c
@@ -32,6 +32,7 @@
Curl_gtls_ - prefix for GnuTLS ones
Curl_nss_ - prefix for NSS ones
Curl_polarssl_ - prefix for PolarSSL ones
+ Curl_cyassl_ - prefix for CyaSSL ones
Note that this source code uses curlssl_* functions, and they are all
defines/macros #defined by the lib-specific header files.
@@ -58,6 +59,7 @@
#include "qssl.h" /* QSOSSL versions */
#include "polarssl.h" /* PolarSSL versions */
#include "axtls.h" /* axTLS versions */
+#include "cyassl.h" /* CyaSSL versions */
#include "sendf.h"
#include "rawstr.h"
#include "url.h"
diff --git a/lib/urldata.h b/lib/urldata.h
index bf74aaf7c..23ade02fe 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -111,6 +111,10 @@
#include <polarssl/ssl.h>
#endif
+#ifdef USE_CYASSL
+#include <openssl/ssl.h>
+#endif
+
#ifdef USE_NSS
#include <nspr.h>
#include <pk11pub.h>
@@ -266,6 +270,11 @@ struct ssl_connect_data {
x509_crl crl;
rsa_context rsa;
#endif /* USE_POLARSSL */
+#ifdef USE_CYASSL
+ SSL_CTX* ctx;
+ SSL* handle;
+ ssl_connect_state connecting_state;
+#endif /* USE_CYASSL */
#ifdef USE_NSS
PRFileDesc *handle;
char *client_nickname;