aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/https/tls/gnutls_cipher_int.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/https/tls/gnutls_cipher_int.c')
-rw-r--r--src/daemon/https/tls/gnutls_cipher_int.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/daemon/https/tls/gnutls_cipher_int.c b/src/daemon/https/tls/gnutls_cipher_int.c
index 21fda10c..9861fab1 100644
--- a/src/daemon/https/tls/gnutls_cipher_int.c
+++ b/src/daemon/https/tls/gnutls_cipher_int.c
@@ -29,7 +29,8 @@
29 29
30cipher_hd_t 30cipher_hd_t
31MHD_gtls_cipher_init (enum MHD_GNUTLS_CipherAlgorithm cipher, 31MHD_gtls_cipher_init (enum MHD_GNUTLS_CipherAlgorithm cipher,
32 const MHD_gnutls_datum_t * key, const MHD_gnutls_datum_t * iv) 32 const MHD_gnutls_datum_t * key,
33 const MHD_gnutls_datum_t * iv)
33{ 34{
34 cipher_hd_t ret = NULL; 35 cipher_hd_t ret = NULL;
35 int err = GC_INVALID_CIPHER; /* doesn't matter */ 36 int err = GC_INVALID_CIPHER; /* doesn't matter */
@@ -80,9 +81,9 @@ MHD_gtls_cipher_init (enum MHD_GNUTLS_CipherAlgorithm cipher,
80 81
81 if (err == 0) 82 if (err == 0)
82 { 83 {
83 MHD_gc_cipher_setkey (ret, key->size, (const char*) key->data); 84 MHD_gc_cipher_setkey (ret, key->size, (const char *) key->data);
84 if (iv->data != NULL && iv->size > 0) 85 if (iv->data != NULL && iv->size > 0)
85 MHD_gc_cipher_setiv (ret, iv->size, (const char*) iv->data); 86 MHD_gc_cipher_setiv (ret, iv->size, (const char *) iv->data);
86 } 87 }
87 else if (cipher != MHD_GNUTLS_CIPHER_NULL) 88 else if (cipher != MHD_GNUTLS_CIPHER_NULL)
88 { 89 {
@@ -114,7 +115,8 @@ MHD_gtls_cipher_decrypt (cipher_hd_t handle, void *ciphertext,
114{ 115{
115 if (handle != GNUTLS_CIPHER_FAILED) 116 if (handle != GNUTLS_CIPHER_FAILED)
116 { 117 {
117 if (MHD_gc_cipher_decrypt_inline (handle, ciphertextlen, ciphertext) != 0) 118 if (MHD_gc_cipher_decrypt_inline (handle, ciphertextlen, ciphertext) !=
119 0)
118 { 120 {
119 MHD_gnutls_assert (); 121 MHD_gnutls_assert ();
120 return GNUTLS_E_INTERNAL_ERROR; 122 return GNUTLS_E_INTERNAL_ERROR;