🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #87733

Re: [libcanlock] Version 3

#87733
From: Michael Bäuerle
Date: Sun, 21 May 2017 18:42
42 lines
3043 bytes
Julien ÉLIE wrote:
> Dennis Preiser wrote:
> > Julien ÉLIE wrote:
> > > 
> > > Could you please better explain how to use the -c flag?
> > > 
> > >   -c key,lock  Check Cancel-Key <key> against Cancel-Lock <lock>
> > 
> > You have to provide the scheme via -a:
> > 
> > | % printf "lm" | ./canlock -a sha512 -k "kl"
> > | sha512:adHjY67M8vrEmoRMptSiOWzt3nCmbFiUuaMTeAHZ2VwbfGyselzpU4F3n+DAs2/kL2Pjkq9g+KRNHzRPNL+a2A==
> > | % printf "lm" | ./canlock -a sha512 -l "kl"
> > | sha512:2Qzn5namk4E3FMjAELWTok31kyvyiIdbEcxKmAuBgVGjhQwy+w+9uXXsprpJL7V3krz2RxxZ3KbAWI9xVgIcrA==
> > | % ./canlock -a sha512 -c "adHjY67M8vrEmoRMptSiOWzt3nCmbFiUuaMTeAHZ2VwbfGyselzpU4F3n+DAs2/kL2Pjkq9g+KRNHzRPNL+a2A==","2Qzn5namk4E3FMjAELWTok31kyvyiIdbEcxKmAuBgVGjhQwy+w+9uXXsprpJL7V3krz2RxxZ3KbAWI9xVgIcrA=="
> > | Good
> 
> OK, thanks.
> Could SYNOPSIS be updated to make -a mandatory in the man page?
> It currently reads:
>        canlock [-a scheme] [-q] -c key,lock

It was not mandatory (default was SHA256). But yes, that "<scheme>:"
was generated by -k and -l options, but must be stripped before checking
with the -c option was not intuitive.

Here is a new snapshot:
<http://micha.freeshell.org/libcanlock/src/libcanlock-3.0.0pre21.tar.bz2>
SHA256(libcanlock-3.0.0pre21.tar.bz2)= bfafa2e2fd7f82944ac4c9f4da769d2de693e720b66f0c773f0d6b10765f1f5e

The -c Option now works like you had expected above:
| 
| $ canlock -c "sha512:adHjY67M8vrEmoRMptSiOWzt3nCmbFiUuaMTeAHZ2VwbfGyselzpU4F3n+DAs2/kL2Pjkq9g+KRNHzRPNL+a2A==","sha512:2Qzn5namk4E3FMjAELWTok31kyvyiIdbEcxKmAuBgVGjhQwy+w+9uXXsprpJL7V3krz2RxxZ3KbAWI9xVgIcrA=="
| Good

The -a Option is still accepted together with -c, but no longer used
(and removed from the SYNOPSIS for -c in the man page).

The library function 'cl_split()', that is used by canlock to replace -a
for the input direction, is now part of the new V3 API.

Technical Details
Message-ID: <AABZId+WF0wAAAuh.A1.flnews@Server4.micha.freeshell.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
References: <AABZG2KiAr8AAAFf.A1.flnews@Server1.micha.freeshell.org> <ofkto9$6n3$1@news.trigofacile.com> <1Tdgnna9IjmNfm%dennis@coredump.d--p.de> <ofnibb$tep$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <AABZId+WF0wAAAuh.A1.flnews@Server4.micha.freeshell.org>
Subject: Re: [libcanlock] Version 3
Date: Sun, 21 May 2017 18:42:30 -0000
From: Michael Bäuerle <michael.baeuerle@gmx.net>
References: <AABZG2KiAr8AAAFf.A1.flnews@Server1.micha.freeshell.org> <ofkto9$6n3$1@news.trigofacile.com> <1Tdgnna9IjmNfm%dennis@coredump.d--p.de> <ofnibb$tep$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.(19219).mbox.7z!not-for-mail
Newsgroups: news.software.nntp
Lines: 40
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=fixed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net iilGV9nrECGiR0RFT6AKrwDKlZF6INn4UwoeFCmCaWBi7YvwAa
X-Orig-Path: not-for-mail
Cancel-Lock: sha256:YO3a2TPjBxoDLi9unR8tY5a+TGbKw7YCsHic5Ne2Vn4= sha1:MjIE+m+ZO2Va22HLFv5ND1aFpgM=
Injection-Date: Sun, 21 May 2017 18:42:30 -0000
User-Agent: flnews/0.14 (for HP-UX)
X-Received-Bytes: 2854
X-Received-Body-CRC: 3688661623