Debian Codegraph @

doc/cl_verify_multi.in3

raw
1 .\"=============================================================================
2 .\" Header
3 .\"
4 .\" Copyright (c) 2024 Michael Baeuerle
5 .\"
6 .\" All rights reserved.
7 .\"
8 .\" Permission is hereby granted, free of charge, to any person obtaining
9 .\" a copy of this software and associated documentation files (the
10 .\" "Software"), to deal in the Software without restriction, including
11 .\" without limitation the rights to use, copy, modify, merge, publish,
12 .\" distribute, and/or sell copies of the Software, and to permit persons
13 .\" to whom the Software is furnished to do so, provided that the above
14 .\" copyright notice(s) and this permission notice appear in all copies of
15 .\" the Software and that both the above copyright notice(s) and this
16 .\" permission notice appear in supporting documentation.
17 .\"
18 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19 .\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
21 .\" OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
22 .\" HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY
23 .\" SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
24 .\" RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
25 .\" CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
26 .\" CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
27 .\"
28 .\" Except as contained in this notice, the name of a copyright holder
29 .\" shall not be used in advertising or otherwise to promote the sale, use
30 .\" or other dealings in this Software without prior written authorization
31 .\" of the copyright holder.
32 .\"
33 .\" SPDX-License-Identifier: ICU
34 .\"
35 .\"
36 .TH $NAME 3 $DATE Unix "$NAME $VERSION manual"
37 .\"
38 .\"
39 .\"=============================================================================
40 .\" NAME section
41 .\"
42 .SH NAME
43 cl_verify_multi - Check multiple keys against multiple locks with $NAME
44 .\"
45 .\"
46 .\"=============================================================================
47 .\" SYNOPSIS section
48 .\"
49 .SH SYNOPSIS
50 .nf
51 .B #include <libcanlock-3/canlock.h>
52 .sp
53 .BI "int cl_verify_multi(cl_hash_version *" rejected_hash_list ,
54 .BI " const char *" c_key_list ,
55 .BI " const char *" c_lock_list );
56 .fi
57 .sp
58 Supported values for
59 .I reject_hash
60 (by version 3.3.0 of $NAME):
61 .br
62 CL_SHA1 CL_SHA224 CL_SHA256 CL_SHA384 CL_SHA512
63 .\"
64 .\"
65 .\"=============================================================================
66 .\" DESCRIPTION section
67 .\"
68 .SH DESCRIPTION
69 Attention: This function is not available with versions before 3.3.0.
70 .sp
71 The
72 .BR cl_verify_multi ()
73 function checks a list of <c-key> elements against a list of <c-lock> elements
74 according to the algorithm defined by RFC 8315 in Section 3.5.
75 .sp
76 Hash algorithms for <scheme> that should be rejected can be specified with
77 .IR "rejected_hash_list" .
78 Specify either NULL, to accept all hash algorithms supported by $NAME, or
79 a pointer to an array terminated with CL_INVALID.
80 .br
81 A reject list is used instead of an accept list so that programs using $NAME
82 automatically inherit support for stronger hash algorithms that may be added
83 in the future.
84 .sp
85 The <c-key> elements must be specified with
86 .I c_key_list
87 and the and <c-lock> elements with
88 .IR "c_lock_list" .
89 Both must be strings where the elements are separated by single SP (space)
90 characters.
91 .br
92 The output of the header field parser
93 .BR canlock-hfp
94 is suitable for
95 .I c_key_list
96 and
97 .IR "c_lock_list" .
98 The function
99 .BR cl_hp_parse_field ()
100 from the libcanlock-hp library can be used to execute the parser.
101 .\"
102 .\"
103 .\"=============================================================================
104 .\" RETURN VALUE section
105 .\"
106 .SH RETURN VALUE
107 If one of the keys matches one of the locks, zero is returned.
108 .br
109 All other values indicate an error.
110 .\"
111 .\"
112 .\"=============================================================================
113 .\" AUTHORS section
114 .\"
115 .SH AUTHORS
116 Michael Baeuerle
117 .\"
118 .\"
119 .\"=============================================================================
120 .\" REPORTING BUGS section
121 .\"
122 .SH REPORTING BUGS
123 Report bugs to <mailto:$BUGREPORT>.
124 .\"
125 .\"
126 .\"=============================================================================
127 .\" STANDARDS section
128 .\"
129 .SH STANDARDS
130 .B $NAME
131 tries to comply with the following standards:
132 .PP
133 RFC 5537, RFC 6234, RFC 8315
134 .\"
135 .\"
136 .\"=============================================================================
137 .\" SEE ALSO section
138 .\"
139 .SH SEE ALSO
140 .BR cl_clear_secret (3),
141 .BR cl_get_key (3),
142 .BR cl_get_lock (3),
143 .BR cl_split (3),
144 .BR cl_verify (3),
145 .BR cl_hp_get_field(3),
146 .BR cl_hp_unfold_field(3),
147 .BR cl_hp_parse_field(3),
148 .BR canlock (1),
149 .BR canlock-hfp (1),
150 .BR canlock-mhp (1)
151 .\"
152 .\"
153 .\" EOF