2
0

CURLOPT_PROXY_ISSUERCERT_BLOB.3 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 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.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. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .\"
  25. .TH CURLOPT_PROXY_ISSUERCERT_BLOB 3 "24 Jun 2020" libcurl libcurl
  26. .SH NAME
  27. CURLOPT_PROXY_ISSUERCERT_BLOB \- proxy issuer SSL certificate from memory blob
  28. .SH SYNOPSIS
  29. .nf
  30. #include <curl/curl.h>
  31. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_ISSUERCERT_BLOB,
  32. struct curl_blob *blob);
  33. .fi
  34. .SH DESCRIPTION
  35. Pass a pointer to a curl_blob struct, which contains information (pointer and
  36. size) about a memory block with binary data of a CA certificate in PEM
  37. format. If the option is set, an additional check against the peer certificate
  38. is performed to verify the issuer of the the HTTPS proxy is indeed the one
  39. associated with the certificate provided by the option. This additional check
  40. is useful in multi-level PKI where one needs to enforce that the peer
  41. certificate is from a specific branch of the tree.
  42. This option should be used in combination with the
  43. \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP option. Otherwise, the result of the
  44. check is not considered as failure.
  45. A specific error code (CURLE_SSL_ISSUER_ERROR) is defined with the option,
  46. which is returned if the setup of the SSL/TLS session has failed due to a
  47. mismatch with the issuer of peer certificate
  48. (\fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP has to be set too for the check to
  49. fail).
  50. If the blob is initialized with the flags member of struct curl_blob set to
  51. CURL_BLOB_COPY, the application does not have to keep the buffer around after
  52. setting this.
  53. This option is an alternative to \fICURLOPT_PROXY_ISSUERCERT(3)\fP which
  54. instead expects a file name as input.
  55. .SH DEFAULT
  56. NULL
  57. .SH PROTOCOLS
  58. All TLS-based protocols
  59. .SH EXAMPLE
  60. .nf
  61. CURL *curl = curl_easy_init();
  62. if(curl) {
  63. struct curl_blob blob;
  64. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  65. /* using an HTTPS proxy */
  66. curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
  67. blob.data = certificateData;
  68. blob.len = filesize;
  69. blob.flags = CURL_BLOB_COPY;
  70. curl_easy_setopt(curl, CURLOPT_PROXY_ISSUERCERT_BLOB, &blob);
  71. ret = curl_easy_perform(curl);
  72. curl_easy_cleanup(curl);
  73. }
  74. .fi
  75. .SH AVAILABILITY
  76. Added in 7.71.0. This option is supported by the OpenSSL backends.
  77. .SH RETURN VALUE
  78. Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
  79. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  80. .SH "SEE ALSO"
  81. .BR CURLOPT_PROXY_SSL_VERIFYPEER "(3), " CURLOPT_PROXY_SSL_VERIFYHOST "(3), "
  82. .BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_SSL_VERIFYHOST "(3), "