CURLOPT_SSL_CIPHER_LIST.3 3.5 KB

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