mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
vtls: introduce a new struct for SSL backends
This new struct is similar in nature to Curl_handler: it will define the functions and capabilities of all the SSL backends (where Curl_handler defines the functions and capabilities of protocol handlers). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
c9d526cdbf
commit
e7e03e47d4
@ -23,6 +23,39 @@
|
||||
***************************************************************************/
|
||||
#include "curl_setup.h"
|
||||
|
||||
struct connectdata;
|
||||
|
||||
struct Curl_ssl {
|
||||
const char *name;
|
||||
|
||||
int (*init)(void);
|
||||
void (*cleanup)(void);
|
||||
|
||||
size_t (*version)(char *buffer, size_t size);
|
||||
int (*check_cxn)(struct connectdata *cxn);
|
||||
int (*shutdown)(struct connectdata *conn, int sockindex);
|
||||
bool (*data_pending)(const struct connectdata *conn,
|
||||
int connindex);
|
||||
|
||||
/* return 0 if a find random is filled in */
|
||||
CURLcode (*random)(struct Curl_easy *data, unsigned char *entropy,
|
||||
size_t length);
|
||||
bool (*cert_status_request)(void);
|
||||
|
||||
CURLcode (*connect)(struct connectdata *conn, int sockindex);
|
||||
CURLcode (*connect_nonblocking)(struct connectdata *conn, int sockindex,
|
||||
bool *done);
|
||||
void (*close)(struct connectdata *conn, int sockindex);
|
||||
void (*close_all)(struct Curl_easy *data);
|
||||
void (*session_free)(void *ptr);
|
||||
|
||||
CURLcode (*set_engine)(struct Curl_easy *data, const char *engine);
|
||||
CURLcode (*set_engine_default)(struct Curl_easy *data);
|
||||
struct curl_slist *(*engines_list)(struct Curl_easy *data);
|
||||
|
||||
bool (*false_start)(void);
|
||||
};
|
||||
|
||||
#include "openssl.h" /* OpenSSL versions */
|
||||
#include "gtls.h" /* GnuTLS versions */
|
||||
#include "nssg.h" /* NSS versions */
|
||||
|
Loading…
Reference in New Issue
Block a user