mirror of https://github.com/moparisthebest/curl
CURLINFO_TLS_SESSION: always return backend info
... even for those that don't support providing anything in the 'internals' struct member since it offers a convenient way for applications to figure this out.
This commit is contained in:
parent
1467dec147
commit
7362008c1c
|
@ -38,8 +38,8 @@ internal TLS session structure of this underlying SSL library.
|
||||||
This may then be used to extract certificate information in a format
|
This may then be used to extract certificate information in a format
|
||||||
convenient for further processing, such as manual validation. NOTE: this
|
convenient for further processing, such as manual validation. NOTE: this
|
||||||
option may not be available for all SSL backends; unsupported SSL backends
|
option may not be available for all SSL backends; unsupported SSL backends
|
||||||
will return 'CURLSSLBACKEND_NONE' to indicate that they are not supported;
|
will always return NULL in the \fIinternals\fP pointer to indicate that they
|
||||||
this does not mean that no SSL backend was used.
|
are not supported.
|
||||||
|
|
||||||
.nf
|
.nf
|
||||||
struct curl_tlssessioninfo {
|
struct curl_tlssessioninfo {
|
||||||
|
@ -48,6 +48,14 @@ struct curl_tlssessioninfo {
|
||||||
};
|
};
|
||||||
.fi
|
.fi
|
||||||
|
|
||||||
|
The \fIbackend\fP struct member is one of the defines in the CURLSSLBACKEND_*
|
||||||
|
series: CURLSSLBACKEND_NONE (when built without TLS support),
|
||||||
|
CURLSSLBACKEND_OPENSSL, CURLSSLBACKEND_GNUTLS, CURLSSLBACKEND_NSS,
|
||||||
|
CURLSSLBACKEND_GSKIT, CURLSSLBACKEND_POLARSSL, CURLSSLBACKEND_CYASSL,
|
||||||
|
CURLSSLBACKEND_SCHANNEL, CURLSSLBACKEND_DARWINSSL or
|
||||||
|
CURLSSLBACKEND_AXTLS. (Note that the OpenSSL forks are all reported as just
|
||||||
|
OpenSSL here.)
|
||||||
|
|
||||||
The \fIinternals\fP struct member will point to a TLS library specific pointer
|
The \fIinternals\fP struct member will point to a TLS library specific pointer
|
||||||
with the following underlying types:
|
with the following underlying types:
|
||||||
.RS
|
.RS
|
||||||
|
|
|
@ -290,7 +290,7 @@ static CURLcode getinfo_slist(struct SessionHandle *data, CURLINFO info,
|
||||||
void *internals = NULL;
|
void *internals = NULL;
|
||||||
|
|
||||||
*tsip = tsi;
|
*tsip = tsi;
|
||||||
tsi->backend = CURLSSLBACKEND_NONE;
|
tsi->backend = Curl_ssl_backend();
|
||||||
tsi->internals = NULL;
|
tsi->internals = NULL;
|
||||||
|
|
||||||
if(!conn)
|
if(!conn)
|
||||||
|
@ -318,13 +318,11 @@ static CURLcode getinfo_slist(struct SessionHandle *data, CURLINFO info,
|
||||||
internals = conn->ssl[sockindex].handle;
|
internals = conn->ssl[sockindex].handle;
|
||||||
#endif
|
#endif
|
||||||
if(internals) {
|
if(internals) {
|
||||||
tsi->backend = Curl_ssl_backend();
|
|
||||||
tsi->internals = internals;
|
tsi->internals = internals;
|
||||||
}
|
}
|
||||||
/* NOTE: For other SSL backends, it is not immediately clear what data
|
/* NOTE: For other SSL backends, it is not immediately clear what data
|
||||||
to return from 'struct ssl_connect_data'; thus, for now we keep the
|
to return from 'struct ssl_connect_data'; thus we keep 'internals' to
|
||||||
backend as CURLSSLBACKEND_NONE in those cases, which should be
|
NULL which should be interpreted as "not supported" */
|
||||||
interpreted as "not supported" */
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue