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