CURLOPT_SSL_VERIFYPEER.3 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2014, 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 http://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_SSL_VERIFYPEER 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
  24. .SH NAME
  25. CURLOPT_SSL_VERIFYPEER \- verify the peer's SSL certificate
  26. .SH SYNOPSIS
  27. #include <curl/curl.h>
  28. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_VERIFYPEER, long verify);
  29. .SH DESCRIPTION
  30. Pass a long as parameter to enable or disable.
  31. This option determines whether curl verifies the authenticity of the peer's
  32. certificate. A value of 1 means curl verifies; 0 (zero) means it doesn't.
  33. When negotiating a TLS or SSL connection, the server sends a certificate
  34. indicating its identity. Curl verifies whether the certificate is authentic,
  35. i.e. that you can trust that the server is who the certificate says it is.
  36. This trust is based on a chain of digital signatures, rooted in certification
  37. authority (CA) certificates you supply. curl uses a default bundle of CA
  38. certificates (the path for that is determined at build time) and you can
  39. specify alternate certificates with the \fICURLOPT_CAINFO(3)\fP option or the
  40. \fICURLOPT_CAPATH(3)\fP option.
  41. When \fICURLOPT_SSL_VERIFYPEER(3)\fP is enabled, and the verification fails to
  42. prove that the certificate is authentic, the connection fails. When the
  43. option is zero, the peer certificate verification succeeds regardless.
  44. Authenticating the certificate is not enough to be sure about the server. You
  45. typically also want to ensure that the server is the server you mean to be
  46. talking to. Use \fICURLOPT_SSL_VERIFYHOST(3)\fP for that. The check that the
  47. host name in the certificate is valid for the host name you're connecting to
  48. is done independently of the \fICURLOPT_SSL_VERIFYPEER(3)\fP option.
  49. .SH DEFAULT
  50. By default, curl assumes a value of 1.
  51. .SH PROTOCOLS
  52. All TLS based protocols: HTTPS, FTPS, IMAPS, POP3, SMTPS etc.
  53. .SH EXAMPLE
  54. TODO
  55. .SH AVAILABILITY
  56. If built TLS enabled.
  57. .SH RETURN VALUE
  58. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  59. .SH "SEE ALSO"
  60. .BR CURLOPT_SSL_VERIFYHOST "(3), "