.\"=============================================================================
.\" Header
.\"
.\" Copyright (c) 2018-2024 Michael Baeuerle
.\"
.\" All rights reserved.
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
.\" "Software"), to deal in the Software without restriction, including
.\" without limitation the rights to use, copy, modify, merge, publish,
.\" distribute, and/or sell copies of the Software, and to permit persons
.\" to whom the Software is furnished to do so, provided that the above
.\" copyright notice(s) and this permission notice appear in all copies of
.\" the Software and that both the above copyright notice(s) and this
.\" permission notice appear in supporting documentation.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
.\" OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
.\"  HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY
.\" SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER
.\" RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
.\" CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
.\" CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" Except as contained in this notice, the name of a copyright holder
.\" shall not be used in advertising or otherwise to promote the sale, use
.\" or other dealings in this Software without prior written authorization
.\" of the copyright holder.
.\"
.\" SPDX-License-Identifier: ICU
.\"
.\"
.TH $NAME 1 $DATE Unix "$NAME $VERSION manual"
.\"
.\"
.\"=============================================================================
.\" NAME section
.\"
.SH NAME
$NAME \- CLI frontend for libcanlock library
.\"
.\"
.\"=============================================================================
.\" SYNOPSIS section
.\"
.SH SYNOPSIS
.B $NAME
-h | -v
.PP
.B $NAME
[-q] -o
.PP
.B $NAME
[-a scheme] -l [uid]mid
.PP
.B $NAME
[-a scheme] -k [uid]mid
.PP
.B $NAME
[-q] -c key,lock
.PP
.B $NAME
[-q] -m keys,locks
.\"
.\"
.\"=============================================================================
.\" DESCRIPTION section
.\"
.SH DESCRIPTION
Command line utility for Netnews Cancel-Lock authentication scheme.
.PP
.B $NAME
can be used to create <c-lock> and <c-key> elements according to RFC 8315.
The secret data is read from standard input (using EOF for termination).
.PP
.B $NAME
also provides a verify interface with the -c option.
An external header parser is required to extract the <c-key> and <c-lock>
elements from the article headers.
.br
The command line utilities
.BR canlock-mhp (1)
and
.BR canlock-hfp (1)
can be used for this purpose.
.\"
.\"
.\"=============================================================================
.\" OPTIONS section
.\"
.SH OPTIONS
The following options are supported:
.TP 20
.BI -a " scheme
Use the hash algorithm specified by <scheme>.
.br
Supported values for <scheme> (by version 3.0.0 of $NAME):
.br
sha1, sha224, sha256, sha384, sha512
.sp
If this option is not present, sha256 is used as default value (because this is
the mandatory algorithm defined by RFC 8315).
.TP
.BI -l " [uid]mid
Generate Cancel-Lock for Message-ID <mid>.
.br
The Message-ID can be prepended with an optional User-ID <uid>.
.sp
The result is a <c-lock> element.
.TP
.BI -k " [uid]mid
Generate Cancel-Key for Message-ID <mid>.
.br
The Message-ID can be prepended with an optional User-ID <uid>.
.sp
The result is a <c-key> element.
.TP
.BI -c " c-key,c-lock
Verify whether <c-key> element of a cancel or supersede matches the <c-lock>
element of a target article.
.TP
.BI -m " keys,locks
Verify whether one of multiple keys matches one of multiple locks.
.br
The elements of both lists must be separated by SP (space) characters.
.br
Anything must be passed as single parameter of the "-m" option, use appropriate
quoting.
.TP
.BI -q
Write no result to standard output.
.sp
Only valid if specified before -c and -o options.
.TP
.BI -h
Print help message, then exit.
.TP
.BI -o
Print whether libcanlock reports support for overwriting secret data in memory.
.sp
The exit status is zero if
.BR cl_clear_secret (3)
returned zero.
.TP
.BI -v
Print version and compile time options, then exit.
.\"
.\"
.\"=============================================================================
.\" EXIT STATUS section
.\"
.SH EXIT STATUS
Zero on success or regular exit respectively.
.br
All other values indicate an error.
.\"
.\"
.\"=============================================================================
.\" AUTHORS section
.\"
.SH AUTHORS
Michael Baeuerle
.\"
.\"
.\"=============================================================================
.\" REPORTING BUGS section
.\"
.SH REPORTING BUGS
Report bugs to <mailto:$BUGREPORT>.
.\"
.\"
.\"=============================================================================
.\" STANDARDS section
.\"
.SH STANDARDS
.B $NAME
tries to comply with the following standards:
.PP
RFC 5537, RFC 6234, RFC 8315
.\"
.\"
.\"=============================================================================
.\" SEE ALSO section
.\"
.SH SEE ALSO
.BR canlock-hfp (1),
.BR canlock-mhp (1),
.BR cl_clear_secret (3),
.BR cl_get_lock (3),
.BR cl_get_key (3),
.BR cl_split (3),
.BR cl_verify (3),
.BR cl_verify_multi (3)
.br
.BR http://en.wikipedia.org/wiki/Usenet
.\"
.\"
.\" EOF
