summaryrefslogtreecommitdiffstats
path: root/crypto/evp/e_rc5.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2019-06-28 16:29:42 +0100
committerMatt Caswell <matt@openssl.org>2019-07-01 10:18:37 +0100
commit9a131ad7477f85d40ee96853e60d0de86f5f4e09 (patch)
treeb6fad564674f3cd12da7f9c617fa4c78ed943f48 /crypto/evp/e_rc5.c
parent792cb4ee8d82e4b063f707fc9f4992271ffd65ab (diff)
Change RC5_32_set_key to return an int type
If the key is too long we now return an error. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8834)
Diffstat (limited to 'crypto/evp/e_rc5.c')
-rw-r--r--crypto/evp/e_rc5.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/evp/e_rc5.c b/crypto/evp/e_rc5.c
index fdd4e9d871..95a626bd4f 100644
--- a/crypto/evp/e_rc5.c
+++ b/crypto/evp/e_rc5.c
@@ -70,9 +70,8 @@ static int r_32_12_16_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
EVPerr(EVP_F_R_32_12_16_INIT_KEY, EVP_R_BAD_KEY_LENGTH);
return 0;
}
- RC5_32_set_key(&data(ctx)->ks, EVP_CIPHER_CTX_key_length(ctx),
- key, data(ctx)->rounds);
- return 1;
+ return RC5_32_set_key(&data(ctx)->ks, EVP_CIPHER_CTX_key_length(ctx),
+ key, data(ctx)->rounds);
}
#endif