aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2000-11-12 02:13:38 +0000
committerBen Laurie <ben@openssl.org>2000-11-12 02:13:38 +0000
commit757e392d4e5195d59e138a216495f669a9d7dbcf (patch)
treeb48f0120f31f7fc6493a2fe9252dc8a18b3228d2 /apps
parent2f9f0c72de36b2d770f380c04e389c910c315304 (diff)
downloadopenssl-757e392d4e5195d59e138a216495f669a9d7dbcf.zip
openssl-757e392d4e5195d59e138a216495f669a9d7dbcf.tar.gz
openssl-757e392d4e5195d59e138a216495f669a9d7dbcf.tar.bz2
Make Rijndael work! Those long flights have some good points.
Diffstat (limited to 'apps')
-rw-r--r--apps/enc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/enc.c b/apps/enc.c
index 84179f5..c319f54 100644
--- a/apps/enc.c
+++ b/apps/enc.c
@@ -92,7 +92,7 @@ int MAIN(int argc, char **argv)
unsigned char *buff=NULL,*bufsize=NULL;
int bsize=BSIZE,verbose=0;
int ret=1,inl;
- unsigned char key[24],iv[MD5_DIGEST_LENGTH];
+ unsigned char key[EVP_MAX_KEY_LENGTH],iv[EVP_MAX_IV_LENGTH];
unsigned char salt[PKCS5_SALT_LEN];
char *str=NULL, *passarg = NULL, *pass = NULL;
char *hkey=NULL,*hiv=NULL,*hsalt = NULL;
@@ -542,12 +542,12 @@ bad:
else
memset(str,0,strlen(str));
}
- if ((hiv != NULL) && !set_hex(hiv,iv,8))
+ if ((hiv != NULL) && !set_hex(hiv,iv,sizeof iv))
{
BIO_printf(bio_err,"invalid hex iv value\n");
goto end;
}
- if ((hkey != NULL) && !set_hex(hkey,key,24))
+ if ((hkey != NULL) && !set_hex(hkey,key,sizeof key))
{
BIO_printf(bio_err,"invalid hex key value\n");
goto end;