Debian Codegraph @

doc/cl_verify.in3

raw
1 .\"=============================================================================
2 .\" Header
3 .\"
4 .\" Copyright (c) 2018-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 - Check whether key and lock strings match 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(cl_hash_version " hash ,
54 .BI " const char *" c_key_string ", const char *" c_lock_string );
55 .fi
56 .sp
57 Supported values for
58 .I hash
59 (by version 3.0.0 of $NAME):
60 .br
61 CL_SHA1 CL_SHA224 CL_SHA256 CL_SHA384 CL_SHA512
62 .\"
63 .\"
64 .\"=============================================================================
65 .\" DESCRIPTION section
66 .\"
67 .SH DESCRIPTION
68 The
69 .BR cl_verify ()
70 function checks whether a <c-key-string> and a <c-lock-string> element according
71 to RFC 8315 matches or not.
72 .sp
73 The hash algorithm for <scheme> is selected with
74 .IR "hash" .
75 .sp
76 The <c-key-string> element is specified with
77 .I c_key_string
78 and the <c-lock-string> element with
79 .IR "c_lock_string" .
80 .sp
81 The function
82 .BR cl_split ()
83 can be used to extract <c-key-string> from <c-key> (or <c-lock-string> from
84 <c-lock> respectively) elements.
85 .sp
86 Consider the function
87 .BR cl_verify_multi ()
88 to check multiple keys against multiple locks.
89 .\"
90 .\"
91 .\"=============================================================================
92 .\" RETURN VALUE section
93 .\"
94 .SH RETURN VALUE
95 Upon successful completion zero is returned.
96 .br
97 All other values indicate an error.
98 .\"
99 .\"
100 .\"=============================================================================
101 .\" AUTHORS section
102 .\"
103 .SH AUTHORS
104 Dennis Preiser
105 .br
106 (Based in part on the implementation from G. J. Andruk for Version 2)
107 .sp
108 The base64 implementation is written by Kungliga Tekniska Hogskolan
109 (Royal Institute of Technology, Stockholm, Sweden)
110 .sp
111 The hash algorithms are implemented with code from RFC 6234
112 .\"
113 .\"
114 .\"=============================================================================
115 .\" REPORTING BUGS section
116 .\"
117 .SH REPORTING BUGS
118 Report bugs to <mailto:$BUGREPORT>.
119 .\"
120 .\"
121 .\"=============================================================================
122 .\" STANDARDS section
123 .\"
124 .SH STANDARDS
125 .B $NAME
126 tries to comply with the following standards:
127 .PP
128 RFC 5537, RFC 6234, RFC 8315
129 .\"
130 .\"
131 .\"=============================================================================
132 .\" SEE ALSO section
133 .\"
134 .SH SEE ALSO
135 .BR cl_clear_secret (3),
136 .BR cl_get_key (3),
137 .BR cl_get_lock (3),
138 .BR cl_split (3),
139 .BR cl_verify_multi (3),
140 .BR cl_hp_get_field(3),
141 .BR cl_hp_unfold_field(3),
142 .BR cl_hp_parse_field(3),
143 .BR canlock (1),
144 .BR canlock-hfp (1),
145 .BR canlock-mhp (1)
146 .\"
147 .\"
148 .\" EOF