summaryrefslogtreecommitdiff
path: root/usr/src/common/openssl/crypto/rsa/rsa_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/common/openssl/crypto/rsa/rsa_test.c')
-rw-r--r--usr/src/common/openssl/crypto/rsa/rsa_test.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr/src/common/openssl/crypto/rsa/rsa_test.c b/usr/src/common/openssl/crypto/rsa/rsa_test.c
index 924e9ad1f6..0f8059ccfd 100644
--- a/usr/src/common/openssl/crypto/rsa/rsa_test.c
+++ b/usr/src/common/openssl/crypto/rsa/rsa_test.c
@@ -8,6 +8,7 @@
#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/rand.h>
+#include <openssl/bn.h>
#ifdef OPENSSL_NO_RSA
int main(int argc, char *argv[])
{
@@ -227,10 +228,10 @@ int main(int argc, char *argv[])
plen = sizeof(ptext_ex) - 1;
- for (v = 0; v < 3; v++)
+ for (v = 0; v < 6; v++)
{
key = RSA_new();
- switch (v) {
+ switch (v%3) {
case 0:
clen = key1(key, ctext_ex);
break;
@@ -241,6 +242,7 @@ int main(int argc, char *argv[])
clen = key3(key, ctext_ex);
break;
}
+ if (v/3 > 1) key->flags |= RSA_FLAG_NO_EXP_CONSTTIME;
num = RSA_public_encrypt(plen, ptext_ex, ctext, key,
RSA_PKCS1_PADDING);
@@ -312,6 +314,9 @@ int main(int argc, char *argv[])
CRYPTO_mem_leaks_fp(stderr);
+#ifdef OPENSSL_SYS_NETWARE
+ if (err) printf("ERROR: %d\n", err);
+#endif
return err;
}
#endif