CURLOPT_SSL_CIPHER_LIST.3 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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_SSL_CIPHER_LIST 3 "17 Jun 2014" "libcurl 7.37.0" "curl_easy_setopt options"
  24. .SH NAME
  25. CURLOPT_SSL_CIPHER_LIST \- ciphers to use for TLS
  26. .SH SYNOPSIS
  27. .nf
  28. #include <curl/curl.h>
  29. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSL_CIPHER_LIST, char *list);
  30. .fi
  31. .SH DESCRIPTION
  32. Pass a char *, pointing to a null-terminated string holding the list of
  33. ciphers to use for the SSL connection. The list must be syntactically correct,
  34. it consists of one or more cipher strings separated by colons. Commas or
  35. spaces are also acceptable separators but colons are normally used, \&!, \&-
  36. and \&+ can be used as operators.
  37. For OpenSSL and GnuTLS valid examples of cipher lists include \fBRC4-SHA\fP,
  38. \fBSHA1+DES\fP, \fBTLSv1\fP and \fBDEFAULT\fP. The default list is normally
  39. set when you compile OpenSSL.
  40. For NSS, valid examples of cipher lists include \fBrsa_rc4_128_md5\fP,
  41. \fBrsa_aes_128_sha\fP, etc. With NSS you do not add/remove ciphers. If one uses
  42. this option then all known ciphers are disabled and only those passed in are
  43. enabled.
  44. For WolfSSL, valid examples of cipher lists include \fBECDHE-RSA-RC4-SHA\fP,
  45. \fBAES256-SHA:AES256-SHA256\fP, etc.
  46. For BearSSL, valid examples of cipher lists include
  47. \fBECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256\fP, or when using IANA names
  48. \fBTLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256:TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\fP,
  49. etc.
  50. With BearSSL you do not add/remove ciphers. If one uses this option then all
  51. known ciphers are disabled and only those passed in are enabled.
  52. you will find more details about cipher lists on this URL:
  53. https://curl.se/docs/ssl-ciphers.html
  54. The application does not have to keep the string around after setting this
  55. option.
  56. .SH DEFAULT
  57. NULL, use internal default
  58. .SH PROTOCOLS
  59. All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
  60. .SH EXAMPLE
  61. .nf
  62. CURL *curl = curl_easy_init();
  63. if(curl) {
  64. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
  65. curl_easy_setopt(curl, CURLOPT_SSL_CIPHER_LIST, "TLSv1");
  66. ret = curl_easy_perform(curl);
  67. curl_easy_cleanup(curl);
  68. }
  69. .fi
  70. .SH AVAILABILITY
  71. Added in 7.9, in 7.83.0 for BearSSL
  72. If built TLS enabled.
  73. .SH RETURN VALUE
  74. Returns CURLE_OK if TLS is supported, CURLE_UNKNOWN_OPTION if not, or
  75. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  76. .SH "SEE ALSO"
  77. .BR CURLOPT_TLS13_CIPHERS "(3), " CURLOPT_SSLVERSION "(3), "
  78. .BR CURLOPT_PROXY_SSL_CIPHER_LIST "(3), " CURLOPT_PROXY_TLS13_CIPHERS "(3), "
  79. .BR CURLOPT_USE_SSL "(3), "