Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-crypto
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-crypto
Commits
ac6dede4
Commit
ac6dede4
authored
Sep 11, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch to VCL_STRANDS
parent
2e4238d7
Pipeline
#455
failed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
vmod_crypto.c
src/vmod_crypto.c
+12
-9
vmod_crypto.vcc
src/vmod_crypto.vcc
+1
-1
No files found.
src/vmod_crypto.c
View file @
ac6dede4
...
@@ -309,27 +309,31 @@ crypto_verifier_task_md_ctx(VRT_CTX,
...
@@ -309,27 +309,31 @@ crypto_verifier_task_md_ctx(VRT_CTX,
VCL_BOOL
VCL_BOOL
vmod_verifier_update
(
VRT_CTX
,
struct
vmod_crypto_verifier
*
vcv
,
vmod_verifier_update
(
VRT_CTX
,
struct
vmod_crypto_verifier
*
vcv
,
const
char
*
s
,
...
)
VCL_STRANDS
str
)
{
{
EVP_MD_CTX
*
evpctx
=
crypto_verifier_task_md_ctx
(
ctx
,
vcv
,
0
);
EVP_MD_CTX
*
evpctx
=
crypto_verifier_task_md_ctx
(
ctx
,
vcv
,
0
);
va_list
ap
;
const
char
*
s
;
int
i
;
if
(
evpctx
==
NULL
)
if
(
evpctx
==
NULL
)
return
(
0
);
return
(
0
);
AN
(
str
);
ERR_clear_error
();
ERR_clear_error
();
va_start
(
ap
,
s
);
for
(
i
=
0
;
i
<
str
->
n
;
i
++
)
{
while
(
s
!=
vrt_magic_string_end
)
{
s
=
str
->
p
[
i
];
if
(
s
&&
*
s
&&
EVP_DigestVerifyUpdate
(
evpctx
,
s
,
strlen
(
s
))
!=
1
)
{
if
(
s
==
NULL
||
*
s
==
'\0'
)
continue
;
if
(
EVP_DigestVerifyUpdate
(
evpctx
,
s
,
strlen
(
s
))
!=
1
)
{
VRT_fail
(
ctx
,
"EVP_DigestVerifyUpdate"
VRT_fail
(
ctx
,
"EVP_DigestVerifyUpdate"
" failed, error 0x%lx"
,
ERR_get_error
());
" failed, error 0x%lx"
,
ERR_get_error
());
return
(
0
);
return
(
0
);
}
}
s
=
va_arg
(
ap
,
const
char
*
);
}
}
va_end
(
ap
);
return
(
1
);
return
(
1
);
}
}
...
@@ -338,7 +342,6 @@ vmod_verifier_update_blob(VRT_CTX, struct vmod_crypto_verifier *vcv,
...
@@ -338,7 +342,6 @@ vmod_verifier_update_blob(VRT_CTX, struct vmod_crypto_verifier *vcv,
VCL_BLOB
blob
)
VCL_BLOB
blob
)
{
{
EVP_MD_CTX
*
evpctx
=
crypto_verifier_task_md_ctx
(
ctx
,
vcv
,
0
);
EVP_MD_CTX
*
evpctx
=
crypto_verifier_task_md_ctx
(
ctx
,
vcv
,
0
);
va_list
ap
;
if
(
evpctx
==
NULL
)
if
(
evpctx
==
NULL
)
return
(
0
);
return
(
0
);
...
...
src/vmod_crypto.vcc
View file @
ac6dede4
...
@@ -52,7 +52,7 @@ The cryptographic method to be used and the key length are
...
@@ -52,7 +52,7 @@ The cryptographic method to be used and the key length are
automatically determined from _pem_. Typically supported methods
automatically determined from _pem_. Typically supported methods
comprise RSA and DSA.
comprise RSA and DSA.
$Method BOOL .update(STR
ING_LIST
)
$Method BOOL .update(STR
ANDS
)
Add strings to the data to be verfied with the verifier object.
Add strings to the data to be verfied with the verifier object.
...
...
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