projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use BN_rand_range().
[oweals/openssl.git]
/
crypto
/
rsa
/
rsa_test.c
diff --git
a/crypto/rsa/rsa_test.c
b/crypto/rsa/rsa_test.c
index 3a51d99435aaeee66f9a819bb4ca343484147c84..d91e045abf8e8eb94ce65ef81c766fe279d34d7e 100644
(file)
--- a/
crypto/rsa/rsa_test.c
+++ b/
crypto/rsa/rsa_test.c
@@
-8,7
+8,7
@@
#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/rand.h>
-#ifdef NO_RSA
+#ifdef
OPENSSL_
NO_RSA
int main(int argc, char *argv[])
{
printf("No RSA support\n");
int main(int argc, char *argv[])
{
printf("No RSA support\n");
@@
-227,10
+227,6
@@
int main(int argc, char *argv[])
for (v = 0; v < 3; v++)
{
for (v = 0; v < 3; v++)
{
-#if 1
- key = RSA_generate_key(512*(v+1),3,0,0);
- clen=RSA_size(key);
-#else
key = RSA_new();
switch (v) {
case 0:
key = RSA_new();
switch (v) {
case 0:
@@
-243,7
+239,6
@@
int main(int argc, char *argv[])
clen = key3(key, ctext_ex);
break;
}
clen = key3(key, ctext_ex);
break;
}
-#endif
num = RSA_public_encrypt(plen, ptext_ex, ctext, key,
RSA_PKCS1_PADDING);
num = RSA_public_encrypt(plen, ptext_ex, ctext, key,
RSA_PKCS1_PADDING);