diff options
-rw-r--r-- | crypto/gc-libgcrypt.c | 8 | ||||
-rw-r--r-- | lib/gnutls_cipher_int.c | 4 | ||||
-rw-r--r-- | lib/gnutls_global.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/crypto/gc-libgcrypt.c b/crypto/gc-libgcrypt.c index 6d34a74d97..f03ad38948 100644 --- a/crypto/gc-libgcrypt.c +++ b/crypto/gc-libgcrypt.c @@ -114,7 +114,7 @@ gc_cipher_open (int alg, int mode, gc_cipher * outhandle) return GC_INVALID_CIPHER; } - err = gcry_cipher_open (outhandle, gcryalg, gcrymode, 0); + err = gcry_cipher_open ((gcry_cipher_hd_t*) outhandle, gcryalg, gcrymode, 0); if (gcry_err_code (err)) return GC_INVALID_CIPHER; @@ -126,7 +126,7 @@ gc_cipher_setkey (gc_cipher handle, size_t keylen, char *key) { gcry_error_t err; - err = gcry_cipher_setkey (handle, keylen, key); + err = gcry_cipher_setkey (handle, key, keylen); if (gcry_err_code (err)) return GC_INVALID_CIPHER; @@ -138,7 +138,7 @@ gc_cipher_setiv (gc_cipher handle, size_t ivlen, char *iv) { gcry_error_t err; - err = gcry_cipher_setiv (handle, ivlen, iv); + err = gcry_cipher_setiv (handle, iv, ivlen); if (gcry_err_code (err)) return GC_INVALID_CIPHER; @@ -167,4 +167,6 @@ int gc_cipher_close (gc_cipher handle) { gcry_cipher_close (handle); + + return GC_OK; } diff --git a/lib/gnutls_cipher_int.c b/lib/gnutls_cipher_int.c index 5841be7797..f47342ff96 100644 --- a/lib/gnutls_cipher_int.c +++ b/lib/gnutls_cipher_int.c @@ -68,9 +68,9 @@ cipher_hd_t _gnutls_cipher_init(gnutls_cipher_algorithm_t cipher, } if (err == 0) { - gc_cipher_setkey(ret, key->data, key->size); + gc_cipher_setkey(ret, key->size, key->data); if (iv->data != NULL && iv->size > 0) - gc_cipher_setiv(ret, iv->data, iv->size); + gc_cipher_setiv(ret, iv->size, iv->data); } else if (cipher != GNUTLS_CIPHER_NULL) { gnutls_assert(); _gnutls_x509_log("Crypto cipher[%d] error: %d\n", cipher, err); diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c index a1abd805c6..b568357d7f 100644 --- a/lib/gnutls_global.c +++ b/lib/gnutls_global.c @@ -26,8 +26,6 @@ #include <libtasn1.h> #include <gnutls_dh.h> -#include <gc.h> - #define gnutls_log_func LOG_FUNC /* created by asn1c */ |