summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/apps/speed.c
diff options
context:
space:
mode:
authorsimon <simon@FreeBSD.org>2010-11-22 18:23:44 +0000
committersimon <simon@FreeBSD.org>2010-11-22 18:23:44 +0000
commit7a23485c98b888d229c5e0762dbcfcec293fcef6 (patch)
tree5691801dabb6a06320a55f5ce8ed927af41514f3 /crypto/openssl/apps/speed.c
parent9c043d590896a77d5d66b978a963573a41d66ad3 (diff)
downloadFreeBSD-src-7a23485c98b888d229c5e0762dbcfcec293fcef6.zip
FreeBSD-src-7a23485c98b888d229c5e0762dbcfcec293fcef6.tar.gz
Merge OpenSSL 0.9.8p into head.
Security: CVE-2010-3864 Security: http://www.openssl.org/news/secadv_20101116.txt
Diffstat (limited to 'crypto/openssl/apps/speed.c')
-rw-r--r--crypto/openssl/apps/speed.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/crypto/openssl/apps/speed.c b/crypto/openssl/apps/speed.c
index 393a7ba..84ce35d 100644
--- a/crypto/openssl/apps/speed.c
+++ b/crypto/openssl/apps/speed.c
@@ -500,9 +500,6 @@ int MAIN(int, char **);
int MAIN(int argc, char **argv)
{
-#ifndef OPENSSL_NO_ENGINE
- ENGINE *e = NULL;
-#endif
unsigned char *buf=NULL,*buf2=NULL;
int mret=1;
long count=0,save_count=0;
@@ -593,7 +590,6 @@ int MAIN(int argc, char **argv)
unsigned char DES_iv[8];
unsigned char iv[2*MAX_BLOCK_SIZE/8];
#ifndef OPENSSL_NO_DES
- DES_cblock *buf_as_des_cblock = NULL;
static DES_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0};
static DES_cblock key2={0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12};
static DES_cblock key3={0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34};
@@ -806,9 +802,6 @@ int MAIN(int argc, char **argv)
BIO_printf(bio_err,"out of memory\n");
goto end;
}
-#ifndef OPENSSL_NO_DES
- buf_as_des_cblock = (DES_cblock *)buf;
-#endif
if ((buf2=(unsigned char *)OPENSSL_malloc((int)BUFSIZE)) == NULL)
{
BIO_printf(bio_err,"out of memory\n");
@@ -883,7 +876,7 @@ int MAIN(int argc, char **argv)
BIO_printf(bio_err,"no engine given\n");
goto end;
}
- e = setup_engine(bio_err, *argv, 0);
+ setup_engine(bio_err, *argv, 0);
/* j will be increased again further down. We just
don't want speed to confuse an engine with an
algorithm, especially when none is given (which
@@ -1388,7 +1381,8 @@ int MAIN(int argc, char **argv)
count*=2;
Time_F(START);
for (it=count; it; it--)
- DES_ecb_encrypt(buf_as_des_cblock,buf_as_des_cblock,
+ DES_ecb_encrypt((DES_cblock *)buf,
+ (DES_cblock *)buf,
&sch,DES_ENCRYPT);
d=Time_F(STOP);
} while (d <3);
OpenPOWER on IntegriCloud