CURLOPT_PROXY_CAINFO_BLOB.3 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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_CAINFO_BLOB 3 "31 March 2021" libcurl libcurl
  26. .SH NAME
  27. CURLOPT_PROXY_CAINFO_BLOB \- proxy Certificate Authority (CA) bundle in PEM format
  28. .SH SYNOPSIS
  29. .nf
  30. #include <curl/curl.h>
  31. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_CAINFO_BLOB,
  32. struct curl_blob *stblob);
  33. .fi
  34. .SH DESCRIPTION
  35. This option is for connecting to an HTTPS proxy, not an HTTPS server.
  36. Pass a pointer to a curl_blob structure, which contains information (pointer
  37. and size) about a memory block with binary data of PEM encoded content holding
  38. one or more certificates to verify the HTTPS proxy with.
  39. If \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP is zero and you avoid verifying the
  40. server's certificate, \fICURLOPT_PROXY_CAINFO_BLOB(3)\fP is not needed.
  41. This option overrides \fICURLOPT_PROXY_CAINFO(3)\fP.
  42. .SH DEFAULT
  43. NULL
  44. .SH PROTOCOLS
  45. Used with HTTPS proxy
  46. .SH EXAMPLE
  47. .nf
  48. char *strpem; /* strpem must point to a PEM string */
  49. CURL *curl = curl_easy_init();
  50. if(curl) {
  51. struct curl_blob blob;
  52. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  53. /* using an HTTPS proxy */
  54. curl_easy_setopt(curl, CURLOPT_PROXY, "https://localhost:443");
  55. blob.data = strpem;
  56. blob.len = strlen(strpem);
  57. blob.flags = CURL_BLOB_COPY;
  58. curl_easy_setopt(curl, CURLOPT_PROXY_CAINFO_BLOB, &blob);
  59. ret = curl_easy_perform(curl);
  60. curl_easy_cleanup(curl);
  61. }
  62. .fi
  63. .SH AVAILABILITY
  64. Added in 7.77.0.
  65. This option is supported by the rustls (since 7.82.0), OpenSSL, Secure
  66. Transport and Schannel backends.
  67. .SH RETURN VALUE
  68. Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
  69. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  70. .SH "SEE ALSO"
  71. .BR CURLOPT_PROXY_CAINFO "(3), " CURLOPT_PROXY_CAPATH "(3), "
  72. .BR CURLOPT_PROXY_SSL_VERIFYPEER "(3), " CURLOPT_PROXY_SSL_VERIFYHOST "(3), "
  73. .BR CURLOPT_CAINFO "(3), " CURLOPT_CAINFO_BLOB "(3), "
  74. .BR CURLOPT_CAPATH "(3), "
  75. .BR CURLOPT_SSL_VERIFYPEER "(3), " CURLOPT_SSL_VERIFYHOST "(3), "