xref: /curl/docs/libcurl/opts/CURLOPT_KRBLEVEL.md (revision c4ab3337)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLOPT_KRBLEVEL
5Section: 3
6Source: libcurl
7See-also:
8  - CURLOPT_KRBLEVEL (3)
9  - CURLOPT_USE_SSL (3)
10Protocol:
11  - FTP
12Added-in: 7.16.4
13---
14
15# NAME
16
17CURLOPT_KRBLEVEL - FTP kerberos security level
18
19# SYNOPSIS
20
21~~~c
22#include <curl/curl.h>
23
24CURLcode curl_easy_setopt(CURL *handle, CURLOPT_KRBLEVEL, char *level);
25~~~
26
27# DESCRIPTION
28
29Pass a char pointer as parameter. Set the kerberos security level for FTP;
30this also enables kerberos awareness. This is a string that should match one
31of the following: &'clear', &'safe', &'confidential' or &'private'. If the
32string is set but does not match one of these, 'private' is used. Set the
33string to NULL to disable kerberos support for FTP.
34
35The application does not have to keep the string around after setting this
36option.
37
38The application does not have to keep the string around after setting this
39option.
40
41# DEFAULT
42
43NULL
44
45# %PROTOCOLS%
46
47# EXAMPLE
48
49~~~c
50int main(void)
51{
52  CURL *curl = curl_easy_init();
53  if(curl) {
54    CURLcode res;
55    curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
56    curl_easy_setopt(curl, CURLOPT_KRBLEVEL, "private");
57    res = curl_easy_perform(curl);
58    curl_easy_cleanup(curl);
59  }
60}
61~~~
62
63# HISTORY
64
65This option was known as CURLOPT_KRB4LEVEL up to 7.16.3
66
67# %AVAILABILITY%
68
69# RETURN VALUE
70
71Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
72CURLE_OUT_OF_MEMORY if there was insufficient heap space.
73