projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid re-build avalanches with HP-UX make.
[oweals/openssl.git]
/
apps
/
speed.c
diff --git
a/apps/speed.c
b/apps/speed.c
index 7f42b52e73fd1804975c2f7ba04ff1ecb7661f0a..5ed510ced69b94ca505b41824e28f0a06a10ea6d 100644
(file)
--- a/
apps/speed.c
+++ b/
apps/speed.c
@@
-58,6
+58,8
@@
/* most of this code has been pilfered from my libdes speed.c program */
/* most of this code has been pilfered from my libdes speed.c program */
+#ifndef OPENSSL_NO_SPEED
+
#undef SECONDS
#define SECONDS 3
#define RSA_SECONDS 10
#undef SECONDS
#define SECONDS 3
#define RSA_SECONDS 10
@@
-370,7
+372,9
@@
int MAIN(int, char **);
int MAIN(int argc, char **argv)
{
int MAIN(int argc, char **argv)
{
+#ifndef OPENSSL_NO_ENGINE
ENGINE *e = NULL;
ENGINE *e = NULL;
+#endif
unsigned char *buf=NULL,*buf2=NULL;
int mret=1;
long count=0,save_count=0;
unsigned char *buf=NULL,*buf2=NULL;
int mret=1;
long count=0,save_count=0;
@@
-590,6
+594,7
@@
int MAIN(int argc, char **argv)
j--; /* Otherwise, -elapsed gets confused with
an algorithm. */
}
j--; /* Otherwise, -elapsed gets confused with
an algorithm. */
}
+#ifndef OPENSSL_NO_ENGINE
else if ((argc > 0) && (strcmp(*argv,"-engine") == 0))
{
argc--;
else if ((argc > 0) && (strcmp(*argv,"-engine") == 0))
{
argc--;
@@
-606,6
+611,7
@@
int MAIN(int argc, char **argv)
means all of them should be run) */
j--;
}
means all of them should be run) */
j--;
}
+#endif
#ifdef HAVE_FORK
else if ((argc > 0) && (strcmp(*argv,"-multi") == 0))
{
#ifdef HAVE_FORK
else if ((argc > 0) && (strcmp(*argv,"-multi") == 0))
{
@@
-767,6
+773,7
@@
int MAIN(int argc, char **argv)
{
dsa_doit[R_DSA_512]=1;
dsa_doit[R_DSA_1024]=1;
{
dsa_doit[R_DSA_512]=1;
dsa_doit[R_DSA_1024]=1;
+ dsa_doit[R_DSA_2048]=1;
}
else
#endif
}
else
#endif
@@
-865,7
+872,9
@@
int MAIN(int argc, char **argv)
#if defined(TIMES) || defined(USE_TOD)
BIO_printf(bio_err,"-elapsed measure time in real time instead of CPU user time.\n");
#endif
#if defined(TIMES) || defined(USE_TOD)
BIO_printf(bio_err,"-elapsed measure time in real time instead of CPU user time.\n");
#endif
+#ifndef OPENSSL_NO_ENGINE
BIO_printf(bio_err,"-engine e use engine e, possibly a hardware device.\n");
BIO_printf(bio_err,"-engine e use engine e, possibly a hardware device.\n");
+#endif
BIO_printf(bio_err,"-evp e use EVP e.\n");
BIO_printf(bio_err,"-decrypt time decryption instead of encryption (only EVP).\n");
BIO_printf(bio_err,"-mr produce machine readable output.\n");
BIO_printf(bio_err,"-evp e use EVP e.\n");
BIO_printf(bio_err,"-decrypt time decryption instead of encryption (only EVP).\n");
BIO_printf(bio_err,"-mr produce machine readable output.\n");
@@
-998,6
+1007,9
@@
int MAIN(int argc, char **argv)
c[D_CBC_RC5][0]=count;
c[D_CBC_BF][0]=count;
c[D_CBC_CAST][0]=count;
c[D_CBC_RC5][0]=count;
c[D_CBC_BF][0]=count;
c[D_CBC_CAST][0]=count;
+ c[D_CBC_128_AES][0]=count;
+ c[D_CBC_192_AES][0]=count;
+ c[D_CBC_256_AES][0]=count;
for (i=1; i<SIZE_NUM; i++)
{
for (i=1; i<SIZE_NUM; i++)
{
@@
-1023,6
+1035,9
@@
int MAIN(int argc, char **argv)
c[D_CBC_RC5][i]=c[D_CBC_RC5][i-1]*l0/l1;
c[D_CBC_BF][i]=c[D_CBC_BF][i-1]*l0/l1;
c[D_CBC_CAST][i]=c[D_CBC_CAST][i-1]*l0/l1;
c[D_CBC_RC5][i]=c[D_CBC_RC5][i-1]*l0/l1;
c[D_CBC_BF][i]=c[D_CBC_BF][i-1]*l0/l1;
c[D_CBC_CAST][i]=c[D_CBC_CAST][i-1]*l0/l1;
+ c[D_CBC_128_AES][i]=c[D_CBC_128_AES][i-1]*l0/l1;
+ c[D_CBC_192_AES][i]=c[D_CBC_192_AES][i-1]*l0/l1;
+ c[D_CBC_256_AES][i]=c[D_CBC_256_AES][i-1]*l0/l1;
}
#ifndef OPENSSL_NO_RSA
rsa_c[R_RSA_512][0]=count/2000;
}
#ifndef OPENSSL_NO_RSA
rsa_c[R_RSA_512][0]=count/2000;
@@
-1380,6
+1395,7
@@
int MAIN(int argc, char **argv)
EVP_DecryptInit_ex(&ctx,evp_cipher,NULL,key16,iv);
else
EVP_EncryptInit_ex(&ctx,evp_cipher,NULL,key16,iv);
EVP_DecryptInit_ex(&ctx,evp_cipher,NULL,key16,iv);
else
EVP_EncryptInit_ex(&ctx,evp_cipher,NULL,key16,iv);
+ EVP_CIPHER_CTX_set_padding(&ctx, 0);
Time_F(START);
if(decrypt)
Time_F(START);
if(decrypt)
@@
-1393,6
+1409,7
@@
int MAIN(int argc, char **argv)
else
EVP_EncryptFinal_ex(&ctx,buf,&outl);
d=Time_F(STOP);
else
EVP_EncryptFinal_ex(&ctx,buf,&outl);
d=Time_F(STOP);
+ EVP_CIPHER_CTX_cleanup(&ctx);
}
if (evp_md)
{
}
if (evp_md)
{
@@
-1939,3
+1956,4
@@
static int do_multi(int multi)
return 1;
}
#endif
return 1;
}
#endif
+#endif