CURLOPT_PROXY_ISSUERCERT_BLOB.3 3.5 KB

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