cl_verify_multi(3)

cl_verify_multi3

Check multiple keys against multiple locks with libcanlock

Usage

#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 reject_hash (by version 3.3.0 of libcanlock):
CL_SHA1 CL_SHA224 CL_SHA256 CL_SHA384 CL_SHA512

Overview

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 and <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.

Return value

If one of the keys matches one of the locks, zero is returned.
All other values indicate an error.

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

Authors

Michael Baeuerle

Reporting bugs

Report bugs to <mailto:[email protected]>.

Standards

libcanlock tries to comply with the following standards:

RFC 5537, RFC 6234, RFC 8315

From libcanlock-dev 3.3.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.