2014-06-20 06:58:18 +08:00
|
|
|
.\" **************************************************************************
|
|
|
|
.\" * _ _ ____ _
|
|
|
|
.\" * Project ___| | | | _ \| |
|
|
|
|
.\" * / __| | | | |_) | |
|
|
|
|
.\" * | (__| |_| | _ <| |___
|
|
|
|
.\" * \___|\___/|_| \_\_____|
|
|
|
|
.\" *
|
2023-01-02 20:51:48 +08:00
|
|
|
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2014-06-20 06:58:18 +08:00
|
|
|
.\" *
|
|
|
|
.\" * This software is licensed as described in the file COPYING, which
|
|
|
|
.\" * you should have received as part of this distribution. The terms
|
2020-11-04 21:02:01 +08:00
|
|
|
.\" * are also available at https://curl.se/docs/copyright.html.
|
2014-06-20 06:58:18 +08:00
|
|
|
.\" *
|
|
|
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
.\" * copies of the Software, and permit persons to whom the Software is
|
|
|
|
.\" * furnished to do so, under the terms of the COPYING file.
|
|
|
|
.\" *
|
|
|
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
.\" * KIND, either express or implied.
|
|
|
|
.\" *
|
|
|
|
.\" * SPDX-License-Identifier: curl
|
2022-05-17 17:16:50 +08:00
|
|
|
.\" *
|
2014-06-20 06:58:18 +08:00
|
|
|
.\" **************************************************************************
|
|
|
|
.\"
|
2023-04-26 14:58:35 +08:00
|
|
|
.TH CURLOPT_TLSAUTH_PASSWORD 3 "19 Jun 2014" libcurl libcurl
|
2014-06-20 06:58:18 +08:00
|
|
|
.SH NAME
|
2014-11-02 18:33:51 +08:00
|
|
|
CURLOPT_TLSAUTH_PASSWORD \- password to use for TLS authentication
|
2014-06-20 06:58:18 +08:00
|
|
|
.SH SYNOPSIS
|
2021-11-26 21:20:18 +08:00
|
|
|
.nf
|
2014-06-20 06:58:18 +08:00
|
|
|
#include <curl/curl.h>
|
|
|
|
|
|
|
|
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TLSAUTH_PASSWORD, char *pwd);
|
2021-11-26 21:20:18 +08:00
|
|
|
.fi
|
2014-06-20 06:58:18 +08:00
|
|
|
.SH DESCRIPTION
|
2020-06-25 17:38:25 +08:00
|
|
|
Pass a char * as parameter, which should point to the null-terminated password
|
2014-06-20 06:58:18 +08:00
|
|
|
to use for the TLS authentication method specified with the
|
|
|
|
\fICURLOPT_TLSAUTH_TYPE(3)\fP option. Requires that the
|
2014-10-14 16:23:27 +08:00
|
|
|
\fICURLOPT_TLSAUTH_USERNAME(3)\fP option also be set.
|
2016-12-21 21:48:35 +08:00
|
|
|
|
|
|
|
The application does not have to keep the string around after setting this
|
|
|
|
option.
|
2019-12-16 23:03:22 +08:00
|
|
|
|
2021-10-31 23:34:44 +08:00
|
|
|
This feature relies in TLS SRP which does not work with TLS 1.3.
|
2014-06-20 06:58:18 +08:00
|
|
|
.SH DEFAULT
|
|
|
|
NULL
|
|
|
|
.SH PROTOCOLS
|
|
|
|
All TLS-based protocols
|
|
|
|
.SH EXAMPLE
|
2017-05-31 17:56:28 +08:00
|
|
|
.nf
|
|
|
|
CURL *curl = curl_easy_init();
|
|
|
|
if(curl) {
|
|
|
|
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
|
|
|
curl_easy_setopt(curl, CURLOPT_TLSAUTH_TYPE, "SRP");
|
|
|
|
curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, "user");
|
|
|
|
curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, "secret");
|
|
|
|
ret = curl_easy_perform(curl);
|
|
|
|
curl_easy_cleanup(curl);
|
|
|
|
}
|
|
|
|
.fi
|
2014-06-20 06:58:18 +08:00
|
|
|
.SH AVAILABILITY
|
2022-04-26 05:31:22 +08:00
|
|
|
Added in 7.21.4, with the OpenSSL and GnuTLS backends only
|
2014-06-20 06:58:18 +08:00
|
|
|
.SH RETURN VALUE
|
2014-06-21 05:43:26 +08:00
|
|
|
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
|
|
|
|
CURLE_OUT_OF_MEMORY if there was insufficient heap space.
|
2014-06-20 06:58:18 +08:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR CURLOPT_TLSAUTH_TYPE "(3), " CURLOPT_TLSAUTH_USERNAME "(3), "
|