#include <libcanlock-3/canlock.h> int cl_verify_multi(cl_hash_version *rejected_hash_list, const char *c_key_list, const char *c_lock_list);
Supported values for hash (by version 3.3.0 of libcanlock):
CL_SHA1 CL_SHA224 CL_SHA256 CL_SHA384 CL_SHA512
Attention: This function is not available with versions before 3.3.0.
The cl_verify_multi() function checks a list of <c-key> elements against a list of <c-lock> elements according to the algorithm defined by RFC 8315 in Section 3.5.
Hash algorithms for <scheme> that should be rejected can be
specified with rejected_hash_list. Specify either NULL,
to accept all hash algorithms supported by libcanlock, or a pointer
to an array terminated with CL_INVALID.
A reject list is used instead of an accept list so that programs
using libcanlock automatically inherit support for stronger hash
algorithms that may be added in the future.
The <c-key> elements must be specified with c_key_list
and the <c-lock> elements with c_lock_list.
Both must be strings where the elements are separated by single SP
(space) characters.
The output of the header field parser canlock-hfp is suitable
for c_key_list and c_lock_list.
The function cl_hp_parse_field() from the libcanlock-hp library
can be used to execute the parser.
If one of the keys matches one of the locks, zero is returned.
All other values indicate an error.
Michael Bäuerle
RFC 5537, RFC 6234, RFC 8315