diff options
author | Matt Caswell <matt@openssl.org> | 2016-05-26 10:55:11 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-06-06 11:09:06 +0100 |
commit | 5584f65a1027b06fe0cfc4be28d1a232cf180e42 (patch) | |
tree | e1d62f81d9d5a23575e4f4063b47d28e680afcdf /test/rsa_test.c | |
parent | f943e640efbb5ec30bf57b59468c094083c99eb2 (diff) |
Deprecate the flags that switch off constant time
The flags RSA_FLAG_NO_CONSTTIME, DSA_FLAG_NO_EXP_CONSTTIME and
DH_FLAG_NO_EXP_CONSTTIME which previously provided the ability to switch
off the constant time implementation for RSA, DSA and DH have been made
no-ops and deprecated.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'test/rsa_test.c')
-rw-r--r-- | test/rsa_test.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/rsa_test.c b/test/rsa_test.c index c8e68db83b..7d06394c6c 100644 --- a/test/rsa_test.c +++ b/test/rsa_test.c @@ -241,9 +241,9 @@ int main(int argc, char *argv[]) plen = sizeof(ptext_ex) - 1; - for (v = 0; v < 6; v++) { + for (v = 0; v < 3; v++) { key = RSA_new(); - switch (v % 3) { + switch (v) { case 0: clen = key1(key, ctext_ex); break; @@ -254,8 +254,6 @@ int main(int argc, char *argv[]) clen = key3(key, ctext_ex); break; } - if (v / 3 >= 1) - RSA_set_flags(key, RSA_FLAG_NO_CONSTTIME); num = RSA_public_encrypt(plen, ptext_ex, ctext, key, RSA_PKCS1_PADDING); |