File: nbdkit_is_tls.pod

package info (click to toggle)
nbdkit 1.42.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,700 kB
  • sloc: ansic: 59,169; sh: 16,858; makefile: 6,452; python: 1,837; cpp: 1,116; perl: 502; ml: 498; tcl: 62
file content (67 lines) | stat: -rw-r--r-- 1,365 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
=head1 NAME

nbdkit_is_tls - get TLS status of the connection for nbdkit

=head1 SYNOPSIS

 #include <nbdkit-plugin.h>

 int nbdkit_is_tls (void);

=head1 DESCRIPTION

C<nbdkit_is_tls> returns true if and only if TLS negotiation has been
completed on the current connection.  An L<nbdkit(1)> plugin may use
C<nbdkit_is_tls> to limit connections according to whether the client
connection is protected by TLS.  This function uses thread-local magic
so no parameter is required

L<nbdkit-tls-fallback-filter(1)> and the nbdkit I<--tls=require>
option are other alternatives.

=head1 RETURN VALUE

The function returns 1 (true) if TLS negotiation has been completed,
or 0 (false) if not.

If there is an error it calls L<nbdkit_error(3)> and returns C<-1>.

=head1 LANGUAGE BINDINGS

In L<nbdkit-ocaml-plugin(3)>:

 NBDKit.is_tls : unit -> bool

In L<nbdkit-python-plugin(3)>:

 import nbdkit
 tls = nbdkit.is_tls()

In L<nbdkit-rust-plugin(3)>:

 use nbdkit::*;
 pub fn is_tls() -> Result<bool>

In L<nbdkit-sh-plugin(3)> the TLS flag is available as parameter C<$4>
of the C<open> method.

=head1 HISTORY

C<nbdkit_is_tls> was added in nbdkit 1.22.

=head1 SEE ALSO

L<nbdkit(1)>,
L<nbdkit_export_name(3)>,
L<nbdkit-plugin(3)>,
L<nbdkit-filter(3)>,
L<nbdkit-tls(1)>,
L<nbdkit-tls-fallback-filter(1)>.

=head1 AUTHORS

Eric Blake

=head1 COPYRIGHT

Copyright Red Hat