1nbd_set_tls_certificates(3)         LIBNBD         nbd_set_tls_certificates(3)
2
3
4

NAME

6       nbd_set_tls_certificates - set the path to the TLS certificates
7       directory
8

SYNOPSIS

10        #include <libnbd.h>
11
12        int nbd_set_tls_certificates (
13              struct nbd_handle *h, const char *dir
14            );
15

DESCRIPTION

17       Set the path to the TLS certificates directory.  If not set and TLS is
18       used then a compiled in default is used.  For root this is
19       "/etc/pki/libnbd/".  For non-root this is "$HOME/.pki/libnbd" and
20       "$HOME/.config/pki/libnbd".  If none of these directories can be found
21       then the system trusted CAs are used.
22
23       This function may be called regardless of whether TLS is supported, but
24       will have no effect unless nbd_set_tls(3) is also used to request or
25       require TLS.
26

RETURN VALUE

28       If the call is successful the function returns 0.
29

ERRORS

31       On error -1 is returned.
32
33       Refer to "ERROR HANDLING" in libnbd(3) for how to get further details
34       of the error.
35
36       The following parameters must not be NULL: "h", "dir".  For more
37       information see "Non-NULL parameters" in libnbd(3).
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.0.
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_TLS_CERTIFICATES 1
50

SEE ALSO

52       nbd_create(3), nbd_set_tls(3), libnbd(3).
53

AUTHORS

55       Eric Blake
56
57       Richard W.M. Jones
58
60       Copyright Red Hat
61

LICENSE

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