Commit 8bb3443a authored by Steve Holme's avatar Steve Holme
Browse files

vtls: Separate the SSL backend definition from the API setup

Slight code cleanup as the SSL backend #define is mixed up with the API
function setup.
parent 30ef1a07
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2010, DirecTV, Contact: Eric Hu <ehu@directv.com>
 * Copyright (C) 2010 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 2010 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
@@ -50,6 +50,9 @@ int Curl_axtls_random(struct SessionHandle *data,
                      unsigned char *entropy,
                      size_t length);

/* Set the API backend definition to axTLS */
#define CURL_SSL_BACKEND CURLSSLBACKEND_AXTLS

/* API setup for axTLS */
#define curlssl_init Curl_axtls_init
#define curlssl_cleanup Curl_axtls_cleanup
@@ -66,7 +69,6 @@ int Curl_axtls_random(struct SessionHandle *data,
#define curlssl_check_cxn(x) Curl_axtls_check_cxn(x)
#define curlssl_data_pending(x,y) ((void)x, (void)y, 0)
#define curlssl_random(x,y,z) Curl_axtls_random(x,y,z)
#define CURL_SSL_BACKEND CURLSSLBACKEND_AXTLS

#endif /* USE_AXTLS */
#endif /* HEADER_CURL_AXTLS_H */
+4 −2
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2012 - 2014, Nick Zitzmann, <nickzman@gmail.com>.
 * Copyright (C) 2012 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
@@ -52,6 +52,9 @@ void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */
                           unsigned char *md5sum, /* output */
                           size_t md5len);

/* Set the API backend definition to SecureTransport */
#define CURL_SSL_BACKEND CURLSSLBACKEND_DARWINSSL

/* API setup for SecureTransport */
#define curlssl_init() (1)
#define curlssl_cleanup() Curl_nop_stmt
@@ -69,7 +72,6 @@ void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */
#define curlssl_data_pending(x,y) Curl_darwinssl_data_pending(x, y)
#define curlssl_random(x,y,z) ((void)x, Curl_darwinssl_random(y,z))
#define curlssl_md5sum(a,b,c,d) Curl_darwinssl_md5sum(a,b,c,d)
#define CURL_SSL_BACKEND CURLSSLBACKEND_DARWINSSL

#endif /* USE_DARWINSSL */
#endif /* HEADER_CURL_DARWINSSL_H */
+4 −2
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 2012, Marc Hoersken, <info@marc-hoersken.de>, et al.
 * Copyright (C) 2012 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
@@ -93,6 +93,9 @@ size_t Curl_schannel_version(char *buffer, size_t size);

int Curl_schannel_random(unsigned char *entropy, size_t length);

/* Set the API backend definition to Schannel */
#define CURL_SSL_BACKEND CURLSSLBACKEND_SCHANNEL

/* API setup for Schannel */
#define curlssl_init Curl_schannel_init
#define curlssl_cleanup Curl_schannel_cleanup
@@ -108,7 +111,6 @@ int Curl_schannel_random(unsigned char *entropy, size_t length);
#define curlssl_version Curl_schannel_version
#define curlssl_check_cxn(x) ((void)x, -1)
#define curlssl_data_pending Curl_schannel_data_pending
#define CURL_SSL_BACKEND CURLSSLBACKEND_SCHANNEL
#define curlssl_random(x,y,z) ((void)x, Curl_schannel_random(y,z))

#endif /* USE_SCHANNEL */
+4 −2
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
@@ -47,6 +47,9 @@ int Curl_cyassl_random(struct SessionHandle *data,
                       unsigned char *entropy,
                       size_t length);

/* Set the API backend definition to Schannel */
#define CURL_SSL_BACKEND CURLSSLBACKEND_CYASSL

/* API setup for CyaSSL */
#define curlssl_init Curl_cyassl_init
#define curlssl_cleanup() Curl_nop_stmt
@@ -63,7 +66,6 @@ int Curl_cyassl_random(struct SessionHandle *data,
#define curlssl_check_cxn(x) ((void)x, -1)
#define curlssl_data_pending(x,y) Curl_cyassl_data_pending(x,y)
#define curlssl_random(x,y,z) Curl_cyassl_random(x,y,z)
#define CURL_SSL_BACKEND CURLSSLBACKEND_CYASSL

#endif /* USE_CYASSL */
#endif /* HEADER_CURL_CYASSL_H */
+4 −2
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
 * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
@@ -42,6 +42,9 @@ int Curl_gskit_shutdown(struct connectdata * conn, int sockindex);
size_t Curl_gskit_version(char * buffer, size_t size);
int Curl_gskit_check_cxn(struct connectdata * cxn);

/* Set the API backend definition to GSKit */
#define CURL_SSL_BACKEND CURLSSLBACKEND_GSKIT

/* this backend supports CURLOPT_CERTINFO */
#define have_curlssl_certinfo 1

@@ -63,7 +66,6 @@ int Curl_gskit_check_cxn(struct connectdata * cxn);
#define curlssl_check_cxn(x) Curl_gskit_check_cxn(x)
#define curlssl_data_pending(x,y) 0
#define curlssl_random(x,y,z) -1
#define CURL_SSL_BACKEND CURLSSLBACKEND_GSKIT
#endif /* USE_GSKIT */

#endif /* HEADER_CURL_GSKIT_H */
Loading