mirror of
https://github.com/moparisthebest/curl
synced 2024-10-31 15:45:12 -04:00
headers: move the global_sslset() proto from multi.h to curl.h
As it was added to multi.h simply to not break test 1135, which now has been disabled due to the mime API addition anyway and su we can now move the sslset stuff to where the other curl_global_* prototypes are.
This commit is contained in:
parent
7e36b30da8
commit
0d4a6355a8
@ -132,6 +132,27 @@ typedef int curl_socket_t;
|
|||||||
#define curl_socket_typedef
|
#define curl_socket_typedef
|
||||||
#endif /* curl_socket_typedef */
|
#endif /* curl_socket_typedef */
|
||||||
|
|
||||||
|
/* enum for the different supported SSL backends */
|
||||||
|
typedef enum {
|
||||||
|
CURLSSLBACKEND_NONE = 0,
|
||||||
|
CURLSSLBACKEND_OPENSSL = 1,
|
||||||
|
CURLSSLBACKEND_GNUTLS = 2,
|
||||||
|
CURLSSLBACKEND_NSS = 3,
|
||||||
|
CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */
|
||||||
|
CURLSSLBACKEND_GSKIT = 5,
|
||||||
|
CURLSSLBACKEND_POLARSSL = 6,
|
||||||
|
CURLSSLBACKEND_WOLFSSL = 7,
|
||||||
|
CURLSSLBACKEND_SCHANNEL = 8,
|
||||||
|
CURLSSLBACKEND_DARWINSSL = 9,
|
||||||
|
CURLSSLBACKEND_AXTLS = 10,
|
||||||
|
CURLSSLBACKEND_MBEDTLS = 11
|
||||||
|
} curl_sslbackend;
|
||||||
|
|
||||||
|
/* aliases for library clones and renames */
|
||||||
|
#define CURLSSLBACKEND_LIBRESSL CURLSSLBACKEND_OPENSSL
|
||||||
|
#define CURLSSLBACKEND_BORINGSSL CURLSSLBACKEND_OPENSSL
|
||||||
|
#define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL
|
||||||
|
|
||||||
struct curl_httppost {
|
struct curl_httppost {
|
||||||
struct curl_httppost *next; /* next entry in the list */
|
struct curl_httppost *next; /* next entry in the list */
|
||||||
char *name; /* pointer to allocated name */
|
char *name; /* pointer to allocated name */
|
||||||
@ -2319,6 +2340,46 @@ struct curl_slist {
|
|||||||
struct curl_slist *next;
|
struct curl_slist *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NAME curl_global_sslset()
|
||||||
|
*
|
||||||
|
* DESCRIPTION
|
||||||
|
*
|
||||||
|
* When built with multiple SSL backends, curl_global_sslset() allows to
|
||||||
|
* choose one. This function can only be called once, and it must be called
|
||||||
|
* *before* curl_global_init().
|
||||||
|
*
|
||||||
|
* The backend can be identified by the id (e.g. CURLSSLBACKEND_OPENSSL). The
|
||||||
|
* backend can also be specified via the name parameter (passing -1 as id).
|
||||||
|
* If both id and name are specified, the name will be ignored. If neither id
|
||||||
|
* nor name are specified, the function will fail with
|
||||||
|
* CURLSSLSET_UNKNOWN_BACKEND and set the "avail" pointer to the
|
||||||
|
* NULL-terminated list of available backends.
|
||||||
|
*
|
||||||
|
* Upon success, the function returns CURLSSLSET_OK.
|
||||||
|
*
|
||||||
|
* If the specified SSL backend is not available, the function returns
|
||||||
|
* CURLSSLSET_UNKNOWN_BACKEND and sets the "avail" pointer to a NULL-terminated
|
||||||
|
* list of available SSL backends.
|
||||||
|
*
|
||||||
|
* The SSL backend can be set only once. If it has already been set, a
|
||||||
|
* subsequent attempt to change it will result in a CURLSSLSET_TOO_LATE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
curl_sslbackend id;
|
||||||
|
const char *name;
|
||||||
|
} curl_ssl_backend;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
CURLSSLSET_OK = 0,
|
||||||
|
CURLSSLSET_UNKNOWN_BACKEND,
|
||||||
|
CURLSSLSET_TOO_LATE
|
||||||
|
} CURLsslset;
|
||||||
|
|
||||||
|
CURL_EXTERN CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
|
||||||
|
const curl_ssl_backend ***avail);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NAME curl_slist_append()
|
* NAME curl_slist_append()
|
||||||
*
|
*
|
||||||
@ -2359,27 +2420,6 @@ struct curl_certinfo {
|
|||||||
format "name: value" */
|
format "name: value" */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* enum for the different supported SSL backends */
|
|
||||||
typedef enum {
|
|
||||||
CURLSSLBACKEND_NONE = 0,
|
|
||||||
CURLSSLBACKEND_OPENSSL = 1,
|
|
||||||
CURLSSLBACKEND_GNUTLS = 2,
|
|
||||||
CURLSSLBACKEND_NSS = 3,
|
|
||||||
CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */
|
|
||||||
CURLSSLBACKEND_GSKIT = 5,
|
|
||||||
CURLSSLBACKEND_POLARSSL = 6,
|
|
||||||
CURLSSLBACKEND_WOLFSSL = 7,
|
|
||||||
CURLSSLBACKEND_SCHANNEL = 8,
|
|
||||||
CURLSSLBACKEND_DARWINSSL = 9,
|
|
||||||
CURLSSLBACKEND_AXTLS = 10,
|
|
||||||
CURLSSLBACKEND_MBEDTLS = 11
|
|
||||||
} curl_sslbackend;
|
|
||||||
|
|
||||||
/* aliases for library clones and renames */
|
|
||||||
#define CURLSSLBACKEND_LIBRESSL CURLSSLBACKEND_OPENSSL
|
|
||||||
#define CURLSSLBACKEND_BORINGSSL CURLSSLBACKEND_OPENSSL
|
|
||||||
#define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL
|
|
||||||
|
|
||||||
/* Information about the SSL library used and the respective internal SSL
|
/* Information about the SSL library used and the respective internal SSL
|
||||||
handle, which can be used to obtain further information regarding the
|
handle, which can be used to obtain further information regarding the
|
||||||
connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */
|
connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */
|
||||||
|
@ -432,46 +432,6 @@ typedef int (*curl_push_callback)(CURL *parent,
|
|||||||
struct curl_pushheaders *headers,
|
struct curl_pushheaders *headers,
|
||||||
void *userp);
|
void *userp);
|
||||||
|
|
||||||
/*
|
|
||||||
* NAME curl_global_sslset()
|
|
||||||
*
|
|
||||||
* DESCRIPTION
|
|
||||||
*
|
|
||||||
* When built with multiple SSL backends, curl_global_sslset() allows to
|
|
||||||
* choose one. This function can only be called once, and it must be called
|
|
||||||
* *before* curl_global_init().
|
|
||||||
*
|
|
||||||
* The backend can be identified by the id (e.g. CURLSSLBACKEND_OPENSSL). The
|
|
||||||
* backend can also be specified via the name parameter (passing -1 as id).
|
|
||||||
* If both id and name are specified, the name will be ignored. If neither id
|
|
||||||
* nor name are specified, the function will fail with
|
|
||||||
* CURLSSLSET_UNKNOWN_BACKEND and set the "avail" pointer to the
|
|
||||||
* NULL-terminated list of available backends.
|
|
||||||
*
|
|
||||||
* Upon success, the function returns CURLSSLSET_OK.
|
|
||||||
*
|
|
||||||
* If the specified SSL backend is not available, the function returns
|
|
||||||
* CURLSSLSET_UNKNOWN_BACKEND and sets the "avail" pointer to a NULL-terminated
|
|
||||||
* list of available SSL backends.
|
|
||||||
*
|
|
||||||
* The SSL backend can be set only once. If it has already been set, a
|
|
||||||
* subsequent attempt to change it will result in a CURLSSLSET_TOO_LATE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
curl_sslbackend id;
|
|
||||||
const char *name;
|
|
||||||
} curl_ssl_backend;
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
CURLSSLSET_OK = 0,
|
|
||||||
CURLSSLSET_UNKNOWN_BACKEND,
|
|
||||||
CURLSSLSET_TOO_LATE
|
|
||||||
} CURLsslset;
|
|
||||||
|
|
||||||
CURL_EXTERN CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
|
|
||||||
const curl_ssl_backend ***avail);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* end of extern "C" */
|
} /* end of extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user