Verify asymmetric cryptographic signatures from VCL
Find a file
Thibaut Artis d815920b10 build: Don't use vmod_vcs_version if no git repo
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.
2025-09-03 17:36:37 +02:00
src build: Add test files to dist 2025-09-01 18:03:00 +02:00
.clang-tidy CI: Introduce clang-tidy 2025-07-10 09:36:53 +02:00
.gitignore Handle src/vmod_vcs_version.txt 2025-05-23 11:36:57 +02:00
.gitlab-ci.yml CI: Fix for Ubuntu 2025-09-01 18:03:00 +02:00
bootstrap build: Make bootstrap compliant with VCDK 2025-09-01 18:03:00 +02:00
configure.ac build: Don't use vmod_vcs_version if no git repo 2025-09-03 17:36:37 +02:00
LICENSE Standardize LICENSE 2022-12-01 16:19:47 +01:00
Makefile.am CI: Add coverage target to Makefile 2025-07-10 09:36:53 +02:00
README.rst Migrate to VCDK 2025-05-23 11:36:57 +02:00

===========
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