summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2004-08-15 20:33:47 +0000
committerSimon Josefsson <simon@josefsson.org>2004-08-15 20:33:47 +0000
commit0cf58a08dbed12db1202d317b4fd2432a3a58b7b (patch)
tree74dd17dd506c63874d1d362b42f92d41ad2f0d35
parent62cc9fb80cbbdfe1834ffc39f7fe6a99e949f339 (diff)
downloadgnutls-0cf58a08dbed12db1202d317b4fd2432a3a58b7b.tar.gz
Fix warnings.
-rw-r--r--crypto/gc-libgcrypt.c8
-rw-r--r--lib/gnutls_cipher_int.c4
-rw-r--r--lib/gnutls_global.c2
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 */