-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support of pkcs12 certificate in memory with libcurl setopt
- Loading branch information
Showing
17 changed files
with
493 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
.\" ************************************************************************** | ||
.\" * _ _ ____ _ | ||
.\" * Project ___| | | | _ \| | | ||
.\" * / __| | | | |_) | | | ||
.\" * | (__| |_| | _ <| |___ | ||
.\" * \___|\___/|_| \_\_____| | ||
.\" * | ||
.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. | ||
.\" * | ||
.\" * This software is licensed as described in the file COPYING, which | ||
.\" * you should have received as part of this distribution. The terms | ||
.\" * are also available at https://curl.haxx.se/docs/copyright.html. | ||
.\" * | ||
.\" * 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. | ||
.\" * | ||
.\" ************************************************************************** | ||
.\" | ||
.TH CURLOPT_SSLCERT 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options" | ||
.SH NAME | ||
CURLOPT_SSLCERT \- set SSL client certificate | ||
.SH SYNOPSIS | ||
#include <curl/curl.h> | ||
|
||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSLCERT, char *cert); | ||
.SH DESCRIPTION | ||
Pass a pointer to a blob structure, which contain information (pointer and | ||
size)about a memory block with binary data of certificate. The default format | ||
must be "P12", and can be used with OpenSSL, Secure Transport or Schannel. | ||
The string "P12" must be specified with \fICURLOPT_SSLCERTTYPE(3)\fP. | ||
|
||
If the blob is initialized with curl_init_blob_dup, the application does not | ||
have to keep the buffer around after setting this. | ||
If the blob is initialized with curl_init_blob_persist, the application must | ||
keep the buffer around after setting this. | ||
|
||
option. | ||
.SH DEFAULT | ||
NULL | ||
.SH PROTOCOLS | ||
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc. | ||
.SH EXAMPLE | ||
.nf | ||
CURL *curl = curl_easy_init(); | ||
if(curl) { | ||
struct curl_blob stblob; | ||
curl_init_blob_dup((&stblob), ((char*)certificateData), certificateSize); | ||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/"); | ||
curl_easy_setopt(curl, CURLOPT_SSLCERT_BLOB, &stblob); | ||
curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, "P12"); | ||
curl_easy_setopt(curl, CURLOPT_KEYPASSWD, "s3cret"); | ||
ret = curl_easy_perform(curl); | ||
curl_easy_cleanup(curl); | ||
} | ||
.fi | ||
.SH AVAILABILITY | ||
If built TLS enabled. | ||
.SH RETURN VALUE | ||
Returns CURLE_OK if TLS enabled, CURLE_UNKNOWN_OPTION if not, or | ||
CURLE_OUT_OF_MEMORY if there was insufficient heap space. | ||
.SH "SEE ALSO" | ||
.BR CURLOPT_SSLCERTTYPE "(3), " CURLOPT_SSLKEY "(3), " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.