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