mirror of
https://github.com/curl/curl.git
synced 2025-09-14 16:12:43 +03:00
docs: use CURLSSLBACKEND_NONE
[ssl] use CURLSSLBACKEND_NONE instead of (curl_sslbackend)-1 in documentation and examples. Signed-off-by: Ted Lyngmo <ted@lyncon.se> Closes #11909
This commit is contained in:
parent
b2b0534e76
commit
c1ab33ed79
|
@ -49,7 +49,7 @@ int main(int argc, char **argv)
|
||||||
const curl_ssl_backend **list;
|
const curl_ssl_backend **list;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
result = curl_global_sslset((curl_sslbackend)-1, NULL, &list);
|
result = curl_global_sslset(CURLSSLBACKEND_NONE, NULL, &list);
|
||||||
assert(result == CURLSSLSET_UNKNOWN_BACKEND);
|
assert(result == CURLSSLSET_UNKNOWN_BACKEND);
|
||||||
|
|
||||||
for(i = 0; list[i]; i++)
|
for(i = 0; list[i]; i++)
|
||||||
|
@ -64,7 +64,7 @@ int main(int argc, char **argv)
|
||||||
result = curl_global_sslset((curl_sslbackend)id, NULL, NULL);
|
result = curl_global_sslset((curl_sslbackend)id, NULL, NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
result = curl_global_sslset((curl_sslbackend)-1, name, NULL);
|
result = curl_global_sslset(CURLSSLBACKEND_NONE, name, NULL);
|
||||||
|
|
||||||
if(result == CURLSSLSET_UNKNOWN_BACKEND) {
|
if(result == CURLSSLSET_UNKNOWN_BACKEND) {
|
||||||
fprintf(stderr, "Unknown SSL backend id: %s\n", name);
|
fprintf(stderr, "Unknown SSL backend id: %s\n", name);
|
||||||
|
|
|
@ -61,8 +61,9 @@ must be called \fBbefore\fP \fIcurl_global_init(3)\fP.
|
||||||
|
|
||||||
The backend can be identified by the \fIid\fP
|
The backend can be identified by the \fIid\fP
|
||||||
(e.g. \fBCURLSSLBACKEND_OPENSSL\fP). The backend can also be specified via the
|
(e.g. \fBCURLSSLBACKEND_OPENSSL\fP). The backend can also be specified via the
|
||||||
\fIname\fP parameter for a case insensitive match (passing -1 as \fIid\fP). If
|
\fIname\fP parameter for a case insensitive match (passing
|
||||||
both \fIid\fP and \fIname\fP are specified, the \fIname\fP is ignored.
|
\fBCURLSSLBACKEND_NONE\fP as \fIid\fP). If both \fIid\fP and \fIname\fP are
|
||||||
|
specified, the \fIname\fP is ignored.
|
||||||
|
|
||||||
If neither \fIid\fP nor \fPname\fP are specified, the function fails with
|
If neither \fIid\fP nor \fPname\fP are specified, the function fails with
|
||||||
\fBCURLSSLSET_UNKNOWN_BACKEND\fP and set the \fIavail\fP pointer to the
|
\fBCURLSSLSET_UNKNOWN_BACKEND\fP and set the \fIavail\fP pointer to the
|
||||||
|
@ -105,7 +106,7 @@ OpenSSL flavor and version number is use.
|
||||||
|
|
||||||
/* list the available ones */
|
/* list the available ones */
|
||||||
const curl_ssl_backend **list;
|
const curl_ssl_backend **list;
|
||||||
curl_global_sslset((curl_sslbackend)-1, NULL, &list);
|
curl_global_sslset(CURLSSLBACKEND_NONE, NULL, &list);
|
||||||
|
|
||||||
for(i = 0; list[i]; i++)
|
for(i = 0; list[i]; i++)
|
||||||
printf("SSL backend #%d: '%s' (ID: %d)\\n",
|
printf("SSL backend #%d: '%s' (ID: %d)\\n",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user