SSL: (part 2) Added CyaSSL to SSL abstraction layer

This is the modified existing files commit.
This commit is contained in:
Todd A Ouska 2011-03-08 13:54:58 +01:00 committed by Daniel Stenberg
parent a8f30fa555
commit 9e60d8fd9e
6 changed files with 107 additions and 7 deletions

View file

@ -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

View file

@ -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)

View file

@ -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

View file

@ -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"

View file

@ -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;