summaryrefslogtreecommitdiffstats
path: root/providers/common/ciphers/aes.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-08-12 13:14:51 +0200
committerRichard Levitte <levitte@openssl.org>2019-08-15 22:12:25 +0200
commitf73eb733eeeb50df0068d01efaa3221cadb07389 (patch)
tree9ec914d06af87842b9681b4e7cbfe9bbd46c0697 /providers/common/ciphers/aes.c
parent25446a66b69a28c85d178e4454d2caed75d75293 (diff)
Adjust some provider reason codes
BLAKE2 MACs came with a set of new reason codes. Those talking about lengths are consistently called PROV_R_INVALID_FOO_LENGTH, for any name FOO. The cipher messages were briefer. In the interest of having more humanly readable messages, we adjust the reasons used by the ciphers (that's just IV length and key length). Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8877)
Diffstat (limited to 'providers/common/ciphers/aes.c')
-rw-r--r--providers/common/ciphers/aes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/providers/common/ciphers/aes.c b/providers/common/ciphers/aes.c
index a211694a88..32ae19be3f 100644
--- a/providers/common/ciphers/aes.c
+++ b/providers/common/ciphers/aes.c
@@ -59,7 +59,7 @@ static int aes_einit(void *vctx, const unsigned char *key, size_t keylen,
}
if (key != NULL) {
if (keylen != ctx->keylen) {
- PROVerr(PROV_F_AES_EINIT, PROV_R_INVALID_KEYLEN);
+ PROVerr(PROV_F_AES_EINIT, PROV_R_INVALID_KEY_LENGTH);
return 0;
}
return ctx->ciph->init(ctx, key, ctx->keylen);
@@ -79,7 +79,7 @@ static int aes_dinit(void *vctx, const unsigned char *key, size_t keylen,
}
if (key != NULL) {
if (keylen != ctx->keylen) {
- PROVerr(PROV_F_AES_DINIT, PROV_R_INVALID_KEYLEN);
+ PROVerr(PROV_F_AES_DINIT, PROV_R_INVALID_KEY_LENGTH);
return 0;
}
return ctx->ciph->init(ctx, key, ctx->keylen);