Commit 14b0941c authored by Geoff Simmons's avatar Geoff Simmons

Update for compatibility with Varnish 5.1.

parent d09f51c2
Pipeline #197 skipped
......@@ -140,7 +140,7 @@ Example
REQUIREMENTS
------------
This version of the VMOD requires at least Varnish 5.0. See the
This version of the VMOD requires at least Varnish 5.1. See the
project repository for versions that are compatible with other Varnish
versions.
COPYRIGHT
......
......@@ -59,7 +59,7 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl
])# PKG_CHECK_VAR
])
PKG_CHECK_MODULES([libvarnishapi], [varnishapi >= 5.0.0])
PKG_CHECK_MODULES([libvarnishapi], [varnishapi])
PKG_CHECK_VAR([LIBVARNISHAPI_DATAROOTDIR], [varnishapi], [datarootdir])
PKG_CHECK_VAR([LIBVARNISHAPI_BINDIR], [varnishapi], [bindir])
PKG_CHECK_VAR([LIBVARNISHAPI_SBINDIR], [varnishapi], [sbindir])
......
......@@ -48,11 +48,6 @@
#define ERRNOMEM(ctx, msg) \
ERR((ctx), msg ", out of space")
#define INIT_FINI(ctx) (((ctx)->method & (VCL_MET_INIT | VCL_MET_FINI)) != 0)
#define ILLEGAL(ctx, m) \
ERR((ctx), m " is illegal in vcl_init() and vcl_fini().")
struct vmod_blobsha256_hmac {
unsigned magic;
#define VMOD_BLOBSHA256_HMAC_MAGIC 0x96026563
......@@ -155,7 +150,7 @@ VCL_BLOB
vmod_hmac_hmac(VRT_CTX, struct vmod_blobsha256_hmac *h, VCL_BLOB msg)
{
struct vmod_priv *b;
char *snap;
uintptr_t snap;
SHA256_CTX inner_ctx[1], outer_ctx[1];
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
......@@ -247,13 +242,9 @@ VCL_BLOB
vmod_hashf(VRT_CTX, VCL_BLOB msg)
{
struct vmod_priv *b;
char *snap;
uintptr_t snap;
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (INIT_FINI(ctx)) {
ILLEGAL(ctx, "hash()");
return NULL;
}
if (msg == NULL)
return NULL;
......@@ -278,14 +269,10 @@ VCL_BLOB
vmod_hmacf(VRT_CTX, VCL_BLOB msg, VCL_BLOB key)
{
struct vmod_priv *b;
char *snap;
uintptr_t snap;
SHA256_CTX inner_ctx[1], outer_ctx[1];
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (INIT_FINI(ctx)) {
ILLEGAL(ctx, "blobsha256.hmac()");
return NULL;
}
if (msg == NULL || key == NULL)
return NULL;
......
......@@ -67,6 +67,6 @@ Example
REQUIREMENTS
------------
This version of the VMOD requires at least Varnish 5.0. See the
This version of the VMOD requires at least Varnish 5.1. See the
project repository for versions that are compatible with other Varnish
versions.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment