---
name: "cl_verify_multi"
section: "3"
platform: "linux"
package: "libcanlock-dev"
version: "3.3.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/cl_verify_multi"
---

# cl\_verify\_multi(3)

Check multiple keys against multiple locks with libcanlock

## NAME

cl\_verify\_multi - Check multiple keys against multiple locks with libcanlock

## SYNOPSIS

```
#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

## DESCRIPTION

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.

## AUTHORS

Michael Baeuerle

## REPORTING BUGS

Report bugs to \<mailto:michael.baeuerle@gmx.net\>.

## STANDARDS

**libcanlock** tries to comply with the following standards:

RFC 5537, RFC 6234, RFC 8315

## SEE ALSO

[**cl\_clear\_secret**(3)](/cl_clear_secret/3.md), [**cl\_get\_key**(3)](/cl_get_key/3.md), [**cl\_get\_lock**(3)](/cl_get_lock/3.md), [**cl\_split**(3)](/cl_split/3.md), [**cl\_verify**(3)](/cl_verify/3.md), **[cl\_hp\_get\_field(3)](/cl_hp_get_field/3.md),** **[cl\_hp\_unfold\_field(3)](/cl_hp_unfold_field/3.md),** **[cl\_hp\_parse\_field(3)](/cl_hp_parse_field/3.md),** [**canlock**(1)](/canlock/1.md), [**canlock-hfp**(1)](/canlock-hfp/1.md), [**canlock-mhp**(1)](/canlock-mhp/1.md)
