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
21cd3102
Unverified
Commit
21cd3102
authored
Mar 24, 2021
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename crypto_verifier_task -> crypto_ctx_task
parent
86c5efcf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
vmod_crypto.c
src/vmod_crypto.c
+17
-17
No files found.
src/vmod_crypto.c
View file @
21cd3102
...
...
@@ -460,9 +460,9 @@ struct vmod_crypto_verifier {
EVP_MD_CTX
*
evpctx
;
};
struct
vmod_crypto_
verifier
_task
{
struct
vmod_crypto_
ctx
_task
{
unsigned
magic
;
#define VMOD_CRYPTO_
VERIFIER
_TASK_MAGIC 0x32c81a58
#define VMOD_CRYPTO_
CTX
_TASK_MAGIC 0x32c81a58
EVP_MD_CTX
*
evpctx
;
};
...
...
@@ -565,12 +565,12 @@ vmod_verifier__fini(struct vmod_crypto_verifier **vcvp)
}
static
void
free_crypto_
verifier
_task
(
VRT_CTX
,
void
*
ptr
)
free_crypto_
ctx
_task
(
VRT_CTX
,
void
*
ptr
)
{
struct
vmod_crypto_
verifier
_task
*
vcvt
;
struct
vmod_crypto_
ctx
_task
*
vcvt
;
(
void
)
ctx
;
CAST_OBJ_NOTNULL
(
vcvt
,
ptr
,
VMOD_CRYPTO_
VERIFIER
_TASK_MAGIC
);
CAST_OBJ_NOTNULL
(
vcvt
,
ptr
,
VMOD_CRYPTO_
CTX
_TASK_MAGIC
);
if
(
vcvt
->
evpctx
)
EVP_MD_CTX_free
(
vcvt
->
evpctx
);
vcvt
->
evpctx
=
NULL
;
...
...
@@ -579,14 +579,14 @@ free_crypto_verifier_task(VRT_CTX, void *ptr)
static
const
struct
vmod_priv_methods
verifier_priv_task_methods
[
1
]
=
{{
.
magic
=
VMOD_PRIV_METHODS_MAGIC
,
.
type
=
"vmod_crypto_verifier_priv_task"
,
.
fini
=
free_crypto_
verifier
_task
.
fini
=
free_crypto_
ctx
_task
}};
static
EVP_MD_CTX
*
crypto_
verifier
_task_md_ctx
(
VRT_CTX
,
crypto_
ctx
_task_md_ctx
(
VRT_CTX
,
const
struct
vmod_crypto_verifier
*
vcv
,
int
reset
)
{
struct
vmod_crypto_
verifier
_task
*
vcvt
;
struct
vmod_crypto_
ctx
_task
*
vcvt
;
struct
vmod_priv
*
task
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -601,7 +601,7 @@ crypto_verifier_task_md_ctx(VRT_CTX,
if
(
task
->
priv
)
{
CAST_OBJ_NOTNULL
(
vcvt
,
task
->
priv
,
VMOD_CRYPTO_
VERIFIER
_TASK_MAGIC
);
VMOD_CRYPTO_
CTX
_TASK_MAGIC
);
AN
(
vcvt
->
evpctx
);
if
(
!
reset
)
return
(
vcvt
->
evpctx
);
...
...
@@ -609,15 +609,15 @@ crypto_verifier_task_md_ctx(VRT_CTX,
vcvt
=
WS_Alloc
(
ctx
->
ws
,
sizeof
*
vcvt
);
if
(
vcvt
==
NULL
)
{
VRT_fail
(
ctx
,
"vmod_crypto_
verifier
_task WS_Alloc failed"
);
"vmod_crypto_
ctx
_task WS_Alloc failed"
);
return
(
NULL
);
}
INIT_OBJ
(
vcvt
,
VMOD_CRYPTO_
VERIFIER
_TASK_MAGIC
);
INIT_OBJ
(
vcvt
,
VMOD_CRYPTO_
CTX
_TASK_MAGIC
);
vcvt
->
evpctx
=
EVP_MD_CTX_new
();
if
(
vcvt
->
evpctx
==
NULL
)
{
VRT_fail
(
ctx
,
"vmod_crypto_
verifier
_task EVP_MD_CTX_new()"
"vmod_crypto_
ctx
_task EVP_MD_CTX_new()"
" failed, error 0x%lx"
,
ERR_get_error
());
return
(
NULL
);
}
...
...
@@ -627,7 +627,7 @@ crypto_verifier_task_md_ctx(VRT_CTX,
}
if
(
EVP_MD_CTX_copy_ex
(
vcvt
->
evpctx
,
vcv
->
evpctx
)
!=
1
)
{
VRT_fail
(
ctx
,
"vmod_crypto_
verifier
_task copy"
VRT_fail
(
ctx
,
"vmod_crypto_
ctx
_task copy"
" failed, error 0x%lx"
,
ERR_get_error
());
EVP_MD_CTX_free
(
vcvt
->
evpctx
);
vcvt
->
evpctx
=
NULL
;
...
...
@@ -641,7 +641,7 @@ VCL_BOOL
vmod_verifier_update
(
VRT_CTX
,
struct
vmod_crypto_verifier
*
vcv
,
VCL_STRANDS
str
)
{
EVP_MD_CTX
*
evpctx
=
crypto_
verifier
_task_md_ctx
(
ctx
,
vcv
,
0
);
EVP_MD_CTX
*
evpctx
=
crypto_
ctx
_task_md_ctx
(
ctx
,
vcv
,
0
);
const
char
*
s
;
int
i
;
...
...
@@ -671,7 +671,7 @@ VCL_BOOL
vmod_verifier_update_blob
(
VRT_CTX
,
struct
vmod_crypto_verifier
*
vcv
,
VCL_BLOB
blob
)
{
EVP_MD_CTX
*
evpctx
=
crypto_
verifier
_task_md_ctx
(
ctx
,
vcv
,
0
);
EVP_MD_CTX
*
evpctx
=
crypto_
ctx
_task_md_ctx
(
ctx
,
vcv
,
0
);
if
(
evpctx
==
NULL
)
return
(
0
);
...
...
@@ -692,7 +692,7 @@ vmod_verifier_update_blob(VRT_CTX, struct vmod_crypto_verifier *vcv,
VCL_BOOL
vmod_verifier_reset
(
VRT_CTX
,
struct
vmod_crypto_verifier
*
vcv
)
{
return
(
!!
crypto_
verifier
_task_md_ctx
(
ctx
,
vcv
,
1
));
return
(
!!
crypto_
ctx
_task_md_ctx
(
ctx
,
vcv
,
1
));
}
static
int
...
...
@@ -708,7 +708,7 @@ crypto_err_cb(const char *s, size_t l, void *u)
VCL_BOOL
vmod_verifier_valid
(
VRT_CTX
,
struct
vmod_crypto_verifier
*
vcv
,
VCL_BLOB
sig
)
{
EVP_MD_CTX
*
evpctx
=
crypto_
verifier
_task_md_ctx
(
ctx
,
vcv
,
0
);
EVP_MD_CTX
*
evpctx
=
crypto_
ctx
_task_md_ctx
(
ctx
,
vcv
,
0
);
VCL_BOOL
r
;
if
(
evpctx
==
NULL
)
...
...
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