Commit 676ad923 authored by Nils Goroll's avatar Nils Goroll
parent 18a00b0e
......@@ -345,9 +345,9 @@ vmod_verifier_update_blob(VRT_CTX, struct vmod_crypto_verifier *vcv,
ERR_clear_error();
if (blob && blob->len > 0) {
AN(blob->priv);
AN(blob->blob);
if (EVP_DigestVerifyUpdate(evpctx,
blob->priv, blob->len) != 1) {
blob->blob, blob->len) != 1) {
VRT_fail(ctx, "EVP_DigestVerifyUpdate"
" failed, error 0x%lx", ERR_get_error());
return (0);
......@@ -380,11 +380,11 @@ VCL_BOOL vmod_verifier_valid(VRT_CTX,
if (evpctx == NULL)
return (0);
if (sig == NULL || sig->len == 0 || sig->priv == NULL)
if (sig == NULL || sig->len == 0 || sig->blob == NULL)
return (0);
ERR_clear_error();
r = !! EVP_DigestVerifyFinal(evpctx, sig->priv, sig->len);
r = !! EVP_DigestVerifyFinal(evpctx, sig->blob, sig->len);
if (! r) {
VSLb(ctx->vsl, SLT_Debug, "%s.valid() failed", vcv->vcl_name);
......
......@@ -4,40 +4,32 @@
.. Edit vmod.vcc and run make instead
..
.. role:: ref(emphasis)
.. _vmod_crypto(3):
===========
vmod_crypto
===========
:tocdepth: 1
----------------------------------------
Public Key hash verification for Varnish
----------------------------------------
.. _vmod_crypto(3):
:Manual section: 3
======================================================
vmod_crypto - Public Key hash verification for Varnish
======================================================
SYNOPSIS
========
.. parsed-literal::
::
import crypto [from "path"] ;
new xverifier = crypto.verifier(ENUM digest, STRING key)
import crypto [from "path"]
BOOL xverifier.update(STRING)
:ref:`obj_verifier`
BOOL xverifier.update_blob(BLOB)
:ref:`func_verifier.update`
BOOL xverifier.reset()
:ref:`func_verifier.update_blob`
BOOL xverifier.valid(BLOB signature)
:ref:`func_verifier.reset`
:ref:`func_verifier.valid`
DESCRIPTION
===========
......@@ -66,16 +58,6 @@ Example
}
} -start
CONTENTS
========
* :ref:`obj_verifier`
* :ref:`func_verifier.reset`
* :ref:`func_verifier.update`
* :ref:`func_verifier.update_blob`
* :ref:`func_verifier.valid`
.. _obj_verifier:
new xverifier = crypto.verifier(ENUM digest, STRING key)
......@@ -104,7 +86,6 @@ BOOL xverifier.update(STRING)
Add strings to the data to be verfied with the verifier object.
.. _func_verifier.update_blob:
BOOL xverifier.update_blob(BLOB)
......@@ -112,7 +93,6 @@ BOOL xverifier.update_blob(BLOB)
Add a blob to the data to be verified with the verifier object.
.. _func_verifier.reset:
BOOL xverifier.reset()
......@@ -121,7 +101,6 @@ BOOL xverifier.reset()
Reset the verfication state as if previous calls to the update methods
had not happened.
.. _func_verifier.valid:
BOOL xverifier.valid(BLOB signature)
......@@ -138,10 +117,6 @@ signature using another call to .valid().
SEE ALSO
========vcl\(7),varnishd\(1)
COPYRIGHT
=========
......
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