Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-blobsha256
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-blobsha256
Commits
14b0941c
Commit
14b0941c
authored
May 11, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update for compatibility with Varnish 5.1.
parent
d09f51c2
Pipeline
#197
skipped
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
19 deletions
+6
-19
README.rst
README.rst
+1
-1
configure.ac
configure.ac
+1
-1
vmod_blobsha256.c
src/vmod_blobsha256.c
+3
-16
vmod_blobsha256.vcc
src/vmod_blobsha256.vcc
+1
-1
No files found.
README.rst
View file @
14b0941c
...
...
@@ -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
...
...
configure.ac
View file @
14b0941c
...
...
@@ -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])
...
...
src/vmod_blobsha256.c
View file @
14b0941c
...
...
@@ -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
;
...
...
src/vmod_blobsha256.vcc
View file @
14b0941c
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment