Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-blobdigest
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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-blobdigest
Commits
f7bcb2fc
Commit
f7bcb2fc
authored
Nov 22, 2018
by
Nils Goroll
Committed by
Geoff Simmons
Mar 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tolerate the change from PR #2840
ref
https://github.com/varnishcache/varnish-cache/issues/2840
parent
83ea6887
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
23 deletions
+32
-23
README.rst
README.rst
+28
-18
usage.vtc
src/tests/usage.vtc
+4
-5
No files found.
README.rst
View file @
f7bcb2fc
...
@@ -12,9 +12,9 @@
...
@@ -12,9 +12,9 @@
vmod_blobdigest
vmod_blobdigest
===============
===============
--------------------------------------------------
--------------------------------------------------
-
digests, checksums and hmacs for the VCL blob type
digests
, checksums and hmacs for the VCL blob type
--------------------------------------------------
--------------------------------------------------
-
:Manual section: 3
:Manual section: 3
...
@@ -26,19 +26,21 @@ SYNOPSIS
...
@@ -26,19 +26,21 @@ SYNOPSIS
import blobdigest [from "path"] ;
import blobdigest [from "path"] ;
new xdigest =
digest(ENUM, BLOB, ENUM
)
new xdigest =
blobdigest.digest(ENUM hash, BLOB init, ENUM scope
)
BOOL xdigest.update(BLOB)
BOOL xdigest.update(BLOB)
BLOB xdigest.final()
BLOB xdigest.final()
BLOB hash(ENUM
, BLOB
)
BLOB hash(ENUM
hash, BLOB msg
)
new xhmac =
hmac(ENUM, BLOB
)
new xhmac =
blobdigest.hmac(ENUM hash, BLOB key
)
BLOB xhmac.hmac(BLOB)
BLOB xhmac.hmac(BLOB
msg
)
BLOB hmacf(ENUM, BLOB, BLOB)
DURATION xhmac.hmac_bench(INT n, BLOB msg)
BLOB hmacf(ENUM hash, BLOB key, BLOB msg)
STRING version()
STRING version()
...
@@ -225,12 +227,12 @@ values:
...
@@ -225,12 +227,12 @@ values:
.. _obj_digest:
.. _obj_digest:
new xdigest = digest(ENUM, BLOB, ENUM
)
digest(...
)
-----------
---------------------------
-----------
::
::
new xdigest = digest(
new xdigest =
blobdigest.
digest(
ENUM {CRC32, ICRC32, MD5, RS, SHA1, SHA224, SHA256, SHA384, SHA512, SHA3_224, SHA3_256, SHA3_384, SHA3_512} hash,
ENUM {CRC32, ICRC32, MD5, RS, SHA1, SHA224, SHA256, SHA384, SHA512, SHA3_224, SHA3_256, SHA3_384, SHA3_512} hash,
BLOB init=0,
BLOB init=0,
ENUM {TASK, TOP} scope=TASK
ENUM {TASK, TOP} scope=TASK
...
@@ -413,8 +415,8 @@ Example::
...
@@ -413,8 +415,8 @@ Example::
.. _func_hash:
.. _func_hash:
BLOB hash(ENUM
, BLOB
)
BLOB hash(ENUM
hash, BLOB msg
)
---------------------
---------------------
---------
::
::
...
@@ -440,12 +442,12 @@ Example::
...
@@ -440,12 +442,12 @@ Example::
.. _obj_hmac:
.. _obj_hmac:
new xhmac =
hmac(ENUM, BLOB
)
new xhmac =
blobdigest.hmac(ENUM hash, BLOB key
)
----------------------------
----------------------------
--------------------
::
::
new xhmac = hmac(
new xhmac =
blobdigest.
hmac(
ENUM {MD5, SHA1, SHA224, SHA256, SHA384, SHA512, SHA3_224, SHA3_256, SHA3_384, SHA3_512} hash,
ENUM {MD5, SHA1, SHA224, SHA256, SHA384, SHA512, SHA3_224, SHA3_256, SHA3_384, SHA3_512} hash,
BLOB key
BLOB key
)
)
...
@@ -488,13 +490,21 @@ Example::
...
@@ -488,13 +490,21 @@ Example::
}
}
.. _func_hmac.hmac_bench:
DURATION xhmac.hmac_bench(INT n, BLOB msg)
------------------------------------------
Run `n` rounds of ``.hmac`` and return the net total duration.
.. _func_hmacf:
.. _func_hmacf:
BLOB hmacf(ENUM
, BLOB, BLOB
)
BLOB hmacf(ENUM
hash, BLOB key, BLOB msg
)
----------------------------
----------------------------
-------------
::
::
...
...
src/tests/usage.vtc
View file @
f7bcb2fc
...
@@ -192,17 +192,16 @@ varnish v1 -vcl {
...
@@ -192,17 +192,16 @@ varnish v1 -vcl {
logexpect l1 -v v1 -g vxid -q "VCL_Error" {
logexpect l1 -v v1 -g vxid -q "VCL_Error" {
expect 0 * Begin req
expect 0 * Begin req
expect * = VCL_Error "^vmod blobdigest error: already finalized in d1.update..$"
expect * = ReqHeader "^empty: D41D8CD98F00B204E9800998ECF8427E$"
expect 0 = VCL_Error "^vmod blobdigest error: already finalized in d1.update..$"
expect 0 = VCL_return "^fail$"
expect * = End
expect * = End
} -start
} -start
client c1 {
client c1 {
txreq
txreq
rxresp
rxresp
expect resp.status >= 501
expect resp.status == 503
expect resp.status <= 503
## varnish-cache #2840
#expect resp.http.empty == "D41D8CD98F00B204E9800998ECF8427E"
} -run
} -run
logexpect l1 -wait
logexpect l1 -wait
...
...
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