Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-ece
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-ece
Commits
60bc3826
Commit
60bc3826
authored
Sep 12, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of cipher_ctx_reset() (apparently not needed).
parent
abdca673
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
33 deletions
+4
-33
rfc8188.c
src/rfc8188.c
+4
-24
rfc8188.h
src/rfc8188.h
+0
-9
No files found.
src/rfc8188.c
View file @
60bc3826
...
...
@@ -150,21 +150,6 @@ derive_prenonce(unsigned char *prk, unsigned char *prenonce, char *errmsg)
return
0
;
}
static
EVP_CIPHER_CTX
*
cipher_ctx_params
(
EVP_CIPHER_CTX
*
ctx
,
int
enc
,
char
*
errmsg
)
{
AN
(
ctx
);
AN
(
errmsg
);
(
void
)
EVP_CIPHER_CTX_set_padding
(
ctx
,
0
);
if
(
EVP_CipherInit_ex
(
ctx
,
EVP_aes_128_gcm
(),
NULL
,
NULL
,
NULL
,
enc
)
!=
1
)
{
mk_error
(
errmsg
);
return
(
NULL
);
}
return
ctx
;
}
EVP_CIPHER_CTX
*
cipher_ctx_init
(
int
enc
,
char
*
errmsg
)
{
...
...
@@ -176,20 +161,15 @@ cipher_ctx_init(int enc, char *errmsg)
mk_error
(
errmsg
);
return
(
NULL
);
}
return
cipher_ctx_params
(
ctx
,
enc
,
errmsg
);
}
EVP_CIPHER_CTX
*
cipher_ctx_reset
(
EVP_CIPHER_CTX
*
ctx
,
int
enc
,
char
*
errmsg
)
{
AN
(
ctx
);
AN
(
errmsg
);
(
void
)
EVP_CIPHER_CTX_set_padding
(
ctx
,
0
);
if
(
EVP_CIPHER_CTX_reset
(
ctx
)
!=
1
)
{
if
(
EVP_CipherInit_ex
(
ctx
,
EVP_aes_128_gcm
(),
NULL
,
NULL
,
NULL
,
enc
)
!=
1
)
{
mk_error
(
errmsg
);
return
(
NULL
);
}
return
c
ipher_ctx_params
(
ctx
,
enc
,
errmsg
)
;
return
c
tx
;
}
ssize_t
...
...
src/rfc8188.h
View file @
60bc3826
...
...
@@ -114,15 +114,6 @@ int derive_prenonce(unsigned char prk[SHA256_LEN],
*/
EVP_CIPHER_CTX
*
cipher_ctx_init
(
int
enc
,
char
errmsg
[
ERRMSG_LEN
]);
/*
* Returns ctx reset for en-/decrypting a new record. ctx MUST have been
* previously initialized with cipher_ctx_init().
*
* Returns NULL on failure.
*/
EVP_CIPHER_CTX
*
cipher_ctx_reset
(
EVP_CIPHER_CTX
*
ctx
,
int
enc
,
char
errmsg
[
ERRMSG_LEN
]);
/* Finalize an EVP_CIPHER_CTX. */
static
inline
void
cipher_ctx_fini
(
EVP_CIPHER_CTX
*
ctx
)
...
...
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