Verify asymmetric cryptographic signatures from VCL
When building from a tarball on a system where git is installed the dist step would fail because it would require the vmod_vcs_version.txt file even though the file is not present nor can be generated. |
||
|---|---|---|
| src | ||
| .clang-tidy | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| bootstrap | ||
| configure.ac | ||
| LICENSE | ||
| Makefile.am | ||
| README.rst | ||
===========
vmod_crypto
===========
------------------------------------------------------------------
Public Key signature generation and verification for Varnish-Cache
------------------------------------------------------------------
DESCRIPTION
===========
This vmod provides VCL access to cryptographic functions from the
_crypt_ library.
Example
::
import crypto;
sub vcl_init {
new v = crypto.verifier(sha256, {"
-----BEGIN PUBLIC KEY-----
...
-----END PUBLIC KEY-----
"});
}
sub vcl_deliver {
if (! v.update("data")) {
return (synth(500, "vmod_crypto error"));
}
if (! v.valid(blob.encode(BASE64URLNOPAD, "base64"))) {
return (synth(400, "invalid signature"));
}
}
SEE ALSO
========
* varnishd(1)
* vcl(7)
COPYRIGHT
=========
::
Copyright 2018,2021 UPLEX Nils Goroll Systemoptimierung
All rights reserved
Author: Nils Goroll <nils.goroll@uplex.de>
See LICENSE