1nbd_set_uri_allow_tls(3)            LIBNBD            nbd_set_uri_allow_tls(3)
2
3
4

NAME

6       nbd_set_uri_allow_tls - set the allowed TLS settings in NBD URIs
7

SYNOPSIS

9        #include <libnbd.h>
10
11        int nbd_set_uri_allow_tls (struct nbd_handle *h, int tls);
12

DESCRIPTION

14       Set which TLS settings are allowed to appear in NBD URIs.  The default
15       is to allow either non-TLS or TLS URIs.
16
17       The "tls" parameter can be:
18
19       "LIBNBD_TLS_DISABLE"
20           TLS URIs are not permitted, ie. a URI such as "nbds://..."  will be
21           rejected.
22
23       "LIBNBD_TLS_ALLOW"
24           This is the default.  TLS may be used or not, depending on whether
25           the URI uses "nbds" or "nbd".
26
27       "LIBNBD_TLS_REQUIRE"
28           TLS URIs are required.  All URIs must use "nbds".
29

RETURN VALUE

31       If the call is successful the function returns 0.
32

ERRORS

34       On error "-1" is returned.
35
36       Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
37       of the error.
38

HANDLE STATE

40       The handle must be newly created, otherwise this call will return an
41       error.
42

VERSION

44       This function first appeared in libnbd 1.2.
45
46       If you need to test if this function is available at compile time check
47       if the following macro is defined:
48
49        #define LIBNBD_HAVE_NBD_SET_URI_ALLOW_TLS 1
50

SEE ALSO

52       nbd_connect_uri(3), nbd_create(3), nbd_set_uri_allow_transports(3),
53       libnbd(3).
54

AUTHORS

56       Eric Blake
57
58       Richard W.M. Jones
59
61       Copyright (C) 2019-2021 Red Hat Inc.
62

LICENSE

64       This library is free software; you can redistribute it and/or modify it
65       under the terms of the GNU Lesser General Public License as published
66       by the Free Software Foundation; either version 2 of the License, or
67       (at your option) any later version.
68
69       This library is distributed in the hope that it will be useful, but
70       WITHOUT ANY WARRANTY; without even the implied warranty of
71       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
72       Lesser General Public License for more details.
73
74       You should have received a copy of the GNU Lesser General Public
75       License along with this library; if not, write to the Free Software
76       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
77       02110-1301 USA
78
79
80
81libnbd-1.12.5                     2022-07-10          nbd_set_uri_allow_tls(3)
Impressum