diff options
author | Matt Caswell <matt@openssl.org> | 2019-06-28 17:29:42 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2019-07-01 11:18:37 +0200 |
commit | 9a131ad7477f85d40ee96853e60d0de86f5f4e09 (patch) | |
tree | b6fad564674f3cd12da7f9c617fa4c78ed943f48 /apps | |
parent | Ensure that rc5 doesn't try to use a key longer than 2040 bits (diff) | |
download | openssl-9a131ad7477f85d40ee96853e60d0de86f5f4e09.tar.xz openssl-9a131ad7477f85d40ee96853e60d0de86f5f4e09.zip |
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 'apps')
-rw-r--r-- | apps/speed.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/speed.c b/apps/speed.c index 5f16b13954..0f3ca9ca76 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -1985,7 +1985,10 @@ int speed_main(int argc, char **argv) RC2_set_key(&rc2_ks, 16, key16, 128); #endif #ifndef OPENSSL_NO_RC5 - RC5_32_set_key(&rc5_ks, 16, key16, 12); + if (!RC5_32_set_key(&rc5_ks, 16, key16, 12)) { + BIO_printf(bio_err, "Failed setting RC5 key\n"); + goto end; + } #endif #ifndef OPENSSL_NO_BF BF_set_key(&bf_ks, 16, key16); |