projects
/
platform
/
core
/
security
/
yaca.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1ef853
)
Allow NULL input/output only in CCM mode.
86/78986/2
author
Dariusz Michaluk
<d.michaluk@samsung.com>
Thu, 7 Jul 2016 14:27:30 +0000
(16:27 +0200)
committer
Krzysztof Jackiewicz
<k.jackiewicz@samsung.com>
Fri, 8 Jul 2016 13:45:54 +0000
(06:45 -0700)
Change-Id: I0758a1f2d8fa7accf8517aec6c93f79cf5f369d5
src/encrypt.c
patch
|
blob
|
history
diff --git
a/src/encrypt.c
b/src/encrypt.c
index
6dc4527
..
5cdbeab
100644
(file)
--- a/
src/encrypt.c
+++ b/
src/encrypt.c
@@
-483,6
+483,10
@@
int encrypt_update(yaca_context_h ctx,
if (c == NULL || input_len == 0 || output_len == NULL || op_type != c->op_type)
return YACA_ERROR_INVALID_PARAMETER;
+ if (EVP_CIPHER_CTX_mode(c->cipher_ctx) != EVP_CIPH_CCM_MODE)
+ if (input == NULL || output == NULL)
+ return YACA_ERROR_INVALID_PARAMETER;
+
switch (op_type) {
case OP_ENCRYPT:
ret = EVP_EncryptUpdate(c->cipher_ctx, output, &loutput_len, input, input_len);