[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
shishi/lib libgcrypt.c
From: |
shishi-commit |
Subject: |
shishi/lib libgcrypt.c |
Date: |
Fri, 19 Sep 2003 16:15:26 -0400 |
CVSROOT: /cvsroot/shishi
Module name: shishi
Branch:
Changes by: Simon Josefsson <address@hidden> 03/09/19 16:15:23
Modified files:
lib : libgcrypt.c
Log message:
Fix ARCFOUR.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/shishi/shishi/lib/libgcrypt.c.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
Patches:
Index: shishi/lib/libgcrypt.c
diff -u shishi/lib/libgcrypt.c:1.13 shishi/lib/libgcrypt.c:1.14
--- shishi/lib/libgcrypt.c:1.13 Fri Sep 19 10:30:55 2003
+++ shishi/lib/libgcrypt.c Fri Sep 19 16:15:23 2003
@@ -277,7 +277,8 @@
}
static int
-libgcrypt_dencrypt (Shishi * handle, int algo, int flags, int decryptp,
+libgcrypt_dencrypt (Shishi * handle, int algo, int flags, int mode,
+ int decryptp,
const char *key, size_t keylen,
const char *iv,
char **ivout,
@@ -287,7 +288,6 @@
size_t ivlen = gcry_cipher_get_algo_blklen (algo);
gcry_cipher_hd_t ch;
gpg_error_t err;
- int mode = GCRY_CIPHER_MODE_CBC;
err = gcry_cipher_open (&ch, algo, mode, flags);
if (err != GPG_ERR_NO_ERROR)
@@ -354,7 +354,8 @@
char **out)
{
return libgcrypt_dencrypt (handle, GCRY_CIPHER_ARCFOUR, 0,
- decryptp, key, keylen, NULL, NULL, in, inlen, out);
+ GCRY_CIPHER_MODE_STREAM, decryptp,
+ key, keylen, NULL, NULL, in, inlen, out);
}
int
@@ -365,7 +366,7 @@
const char *in, size_t inlen,
char **out)
{
- return libgcrypt_dencrypt (handle, GCRY_CIPHER_DES, 0,
+ return libgcrypt_dencrypt (handle, GCRY_CIPHER_DES, 0, GCRY_CIPHER_MODE_CBC,
decryptp, key, 8, iv, ivout, in, inlen, out);
}
@@ -377,7 +378,7 @@
const char *in, size_t inlen,
char **out)
{
- return libgcrypt_dencrypt (handle, GCRY_CIPHER_3DES, 0,
+ return libgcrypt_dencrypt (handle, GCRY_CIPHER_3DES, 0, GCRY_CIPHER_MODE_CBC,
decryptp, key, 24, iv, ivout, in, inlen, out);
}
@@ -390,5 +391,6 @@
char **out)
{
return libgcrypt_dencrypt (handle, GCRY_CIPHER_AES, GCRY_CIPHER_CBC_CTS,
- decryptp, key, keylen, iv, ivout, in, inlen, out);
+ GCRY_CIPHER_MODE_CBC, decryptp,
+ key, keylen, iv, ivout, in, inlen, out);
}