Annotation of embedaddon/curl/docs/libcurl/opts/CURLOPT_SSLCERT.3, revision 1.1

1.1     ! misho       1: .\" **************************************************************************
        !             2: .\" *                                  _   _ ____  _
        !             3: .\" *  Project                     ___| | | |  _ \| |
        !             4: .\" *                             / __| | | | |_) | |
        !             5: .\" *                            | (__| |_| |  _ <| |___
        !             6: .\" *                             \___|\___/|_| \_\_____|
        !             7: .\" *
        !             8: .\" * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
        !             9: .\" *
        !            10: .\" * This software is licensed as described in the file COPYING, which
        !            11: .\" * you should have received as part of this distribution. The terms
        !            12: .\" * are also available at https://curl.haxx.se/docs/copyright.html.
        !            13: .\" *
        !            14: .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
        !            15: .\" * copies of the Software, and permit persons to whom the Software is
        !            16: .\" * furnished to do so, under the terms of the COPYING file.
        !            17: .\" *
        !            18: .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
        !            19: .\" * KIND, either express or implied.
        !            20: .\" *
        !            21: .\" **************************************************************************
        !            22: .\"
        !            23: .TH CURLOPT_SSLCERT 3 "January 29, 2019" "libcurl 7.70.0" "curl_easy_setopt options"
        !            24: 
        !            25: .SH NAME
        !            26: CURLOPT_SSLCERT \- set SSL client certificate
        !            27: .SH SYNOPSIS
        !            28: #include <curl/curl.h>
        !            29: 
        !            30: CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLCERT, char *cert);
        !            31: .SH DESCRIPTION
        !            32: Pass a pointer to a zero terminated string as parameter. The string should be
        !            33: the file name of your client certificate. The default format is "P12" on
        !            34: Secure Transport and "PEM" on other engines, and can be changed with
        !            35: \fICURLOPT_SSLCERTTYPE(3)\fP.
        !            36: 
        !            37: With NSS or Secure Transport, this can also be the nickname of the certificate
        !            38: you wish to authenticate with as it is named in the security database. If you
        !            39: want to use a file from the current directory, please precede it with "./"
        !            40: prefix, in order to avoid confusion with a nickname.
        !            41: 
        !            42: (Schannel only) Client certificates must be specified by a path expression to
        !            43: a certificate store. (Loading PFX is not supported; you can import it to a
        !            44: store first). You can use "<store location>\\<store name>\\<thumbprint>" to
        !            45: refer to a certificate in the system certificates store, for example,
        !            46: "CurrentUser\\MY\\934a7ac6f8a5d579285a74fa61e19f23ddfe8d7a". Thumbprint is
        !            47: usually a SHA-1 hex string which you can see in certificate details. Following
        !            48: store locations are supported: CurrentUser, LocalMachine, CurrentService,
        !            49: Services, CurrentUserGroupPolicy, LocalMachineGroupPolicy,
        !            50: LocalMachineEnterprise.
        !            51: 
        !            52: When using a client certificate, you most likely also need to provide a
        !            53: private key with \fICURLOPT_SSLKEY(3)\fP.
        !            54: 
        !            55: The application does not have to keep the string around after setting this
        !            56: option.
        !            57: .SH DEFAULT
        !            58: NULL
        !            59: .SH PROTOCOLS
        !            60: All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
        !            61: .SH EXAMPLE
        !            62: .nf
        !            63: CURL *curl = curl_easy_init();
        !            64: if(curl) {
        !            65:   curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
        !            66:   curl_easy_setopt(curl, CURLOPT_SSLCERT, "client.pem");
        !            67:   curl_easy_setopt(curl, CURLOPT_SSLKEY, "key.pem");
        !            68:   curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret");
        !            69:   ret = curl_easy_perform(curl);
        !            70:   curl_easy_cleanup(curl);
        !            71: }
        !            72: .fi
        !            73: .SH AVAILABILITY
        !            74: If built TLS enabled.
        !            75: .SH RETURN VALUE
        !            76: Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or
        !            77: CURLE_OUT_OF_MEMORY if there was insufficient heap space.
        !            78: .SH "SEE ALSO"
        !            79: .BR CURLOPT_SSLCERTTYPE "(3), " CURLOPT_SSLKEY "(3), "

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>