diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-05-04 12:10:39 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-05-04 22:31:19 +0200 |
commit | e66cca046cef20d00fba89260dfa6b4a3997233d (patch) | |
tree | 7bc1d35fa61b022ea481a7e891bcfa5c78b2fe48 /lib/vtls/vtls.h | |
parent | f8d608f38d00a129680f5535ed2f1e60fc226d30 (diff) |
vtls: use unified "supports" bitfield member in backends
... instead of previous separate struct fields, to make it easier to
extend and change individual backends without having to modify them all.
closes #2547
Diffstat (limited to 'lib/vtls/vtls.h')
-rw-r--r-- | lib/vtls/vtls.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/vtls/vtls.h b/lib/vtls/vtls.h index 5c3146ee9..e7b87c4d3 100644 --- a/lib/vtls/vtls.h +++ b/lib/vtls/vtls.h @@ -26,20 +26,19 @@ struct connectdata; struct ssl_connect_data; +#define SSLSUPP_CA_PATH (1<<0) /* supports CAPATH */ +#define SSLSUPP_CERTINFO (1<<1) /* supports CURLOPT_CERTINFO */ +#define SSLSUPP_PINNEDPUBKEY (1<<2) /* supports CURLOPT_PINNEDPUBLICKEY */ +#define SSLSUPP_SSL_CTX (1<<3) /* supports CURLOPT_SSL_CTX */ +#define SSLSUPP_HTTPS_PROXY (1<<4) /* supports access via HTTPS proxies */ + struct Curl_ssl { /* * This *must* be the first entry to allow returning the list of available * backends in curl_global_sslset(). */ curl_ssl_backend info; - - unsigned have_ca_path:1; /* supports CAPATH */ - unsigned have_certinfo:1; /* supports CURLOPT_CERTINFO */ - unsigned have_pinnedpubkey:1; /* supports CURLOPT_PINNEDPUBLICKEY */ - unsigned have_ssl_ctx:1; /* supports CURLOPT_SSL_CTX_* */ - - unsigned support_https_proxy:1; /* supports access via HTTPS proxies */ - + unsigned int supports; /* bitfield, see above */ size_t sizeof_ssl_backend_data; int (*init)(void); |