Don't pull in an external action but rely on GitHubs native way to
detect file changes. Also fix a logic flaw where a PR would try to push
an image (but never succeed due to missing secrets).
Co-authored-by: Benjamin Lipp <blipp@rosenpass.eu>
Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit does multiple things at once to improve the user experience:
* Always start with an upper case letter, no mixing
* Hide deprecated `keygen` command, it still works if called
* Extend and rework some documentation textx
* Drop false `log_level` text, it contains a logic error
* Wrap all documentation at 80 chars
Signed-off-by: Paul Spooren <mail@aparcar.org>
If two instances start up at the same time, they end up with different
keys on both ends. Test this with different delays of 2 (working), 1
(flaky) and 0 (broken) seconds.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Readability of public/secret keys can be checked by simply loading the
key and thereby also checking that it's actually valid.
A user should either define `key_out` or a valid WireGuard peer (made of
`device` and `peer`). If neither is defined, let the user know that this
function will never do any good.
Signed-off-by: Paul Spooren <mail@aparcar.org>
The incredible helpful error message would never reach the enduser.
Attach it to upper layer print to help users fix the issues.
Signed-off-by: Paul Spooren <mail@aparcar.org>
The previous `gen-config` output contained no comments and was partly
misleading, i.e. the `pre_shared_key` is actually a path and not the
key itself. Mark things that are optional.
To keep things in sync, add a test that verifies that the configuration
is actually valid.
While at it, use 127.0.0.1 as peer address instead a fictitious domain
which would break the tests.
Signed-off-by: Paul Spooren <mail@aparcar.org>
We already use Dependabot for cargo updates, use it for GitHub action
updates, too. Right now we see warnings every now and then because Node
wants another upgrade or some checkout stuff is about to be deprecated.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Instead of using a static one, generate it via clap_mangen. To generate
the manpage run `rosenpass --generate-manpage <folder>`.
Right now clap does not support flattening of generated manpages,
meaning that each subcommand is explained in its own file. To add extra
sections to the main file `rosenpass.1`, it's rewritten after the
initial creation.
Once clap support flattened Man pages, the `generate_to` call can be
removed and all subcommand are added to the `rosenpass.1` file.
This implementation allows downstream manpage generation to stay
unchanged even after switching from multiple manpages to a flattened
one.
Signed-off-by: Paul Spooren <mail@aparcar.org>
No magic here, this is likely a copy&paste error. Problem is that one
workflow being called "QC" (regressions.yml) cancels out the other "QC"
(qc.yaml).
Signed-off-by: Paul Spooren <mail@aparcar.org>
Those are seconds not ms, also it's BEGIN not BEG.
While over there, drop the unused variable `RETRANSMIT_ABORT` which was
never used anywhere in the code and drop an outdated TODO comment.
Signed-off-by: Paul Spooren <mail@aparcar.org>
While at it, fix the label handling and fix a typo in continue_if, where
a `break` falsely replaced a `continue`
Signed-off-by: Paul Spooren <mail@aparcar.org>
The RTX_BUFFER_SIZE function is nowhere used in the code and when
dropping it, usize_max (const version of max()) becomes obsolete, too.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Drop the unused `dur` function, it's nowhere found in the code.
Document both Timebase and Timebase::now()
Add tests
Signed-off-by: Paul Spooren <mail@aparcar.org>
Trigger the internal assert of owned.rs instead of writing our own. To
correctly test it use `should_panic` macro.
Signed-off-by: Paul Spooren <mail@aparcar.org>
The [api] section is newly added and causes existing installation to
break since they lack the configuration options. Instead, use a serde
default function.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Co-authored-by: Karolin Varner <karo@cupdev.net>
The script can be used to simulate setups of different sizes. A short
description is added to the `misc/` folder for further information.
This can be used for both benchmarking but also hunting down bugs which
may occur with larger setups.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Right now a warning message is logged if no Wireguard peer is defined.
This is misleading in cases where the outfile is used instead.
Signed-off-by: Paul Spooren <mail@aparcar.org>
When creating secret keys or use the out file feature, the material
shouldn't be readble to everyone by default.
Fix: #260
Signed-off-by: Paul Spooren <mail@aparcar.org>
The compare function should do a little-endian comparision, therefore
copy the code from quinier/memsec and don't revert the loop, tada, le.
Signed-off-by: Paul Spooren <mail@aparcar.org>