about summary refs log tree commit diff
path: root/libnm-util/crypto_gnutls.c
diff options
context:
space:
mode:
authorIain Lane <iain@orangesquash.org.uk>2018-09-24 09:29:55 +0100
committerIain Lane <iain@orangesquash.org.uk>2018-09-24 09:29:55 +0100
commite152ec7bf4ba252ff9d3eb13eabd417b931dac9a (patch)
treec323cf856ee0bb8e44590670dd54c19653a55748 /libnm-util/crypto_gnutls.c
parentee9c73a923909e23a649407be77e25235d769e25 (diff)
Import Upstream version 1.12.2
Diffstat (limited to 'libnm-util/crypto_gnutls.c')
-rw-r--r--libnm-util/crypto_gnutls.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libnm-util/crypto_gnutls.c b/libnm-util/crypto_gnutls.c
index 8604c5c3..47c614b9 100644
--- a/libnm-util/crypto_gnutls.c
+++ b/libnm-util/crypto_gnutls.c
@@ -242,15 +242,12 @@ crypto_encrypt (const char *cipher,
 	gsize padded_buf_len, pad_len, output_len;
 	char *padded_buf = NULL;
 	guint32 i;
-	gsize salt_len;
 
-	if (!strcmp (cipher, CIPHER_DES_EDE3_CBC)) {
+	if (!strcmp (cipher, CIPHER_DES_EDE3_CBC))
 		cipher_mech = GNUTLS_CIPHER_3DES_CBC;
-		salt_len = SALT_LEN;
-	} else if (!strcmp (cipher, CIPHER_AES_CBC)) {
+	else if (!strcmp (cipher, CIPHER_AES_CBC))
 		cipher_mech = GNUTLS_CIPHER_AES_128_CBC;
-		salt_len = iv_len;
-	} else {
+	else {
 		g_set_error (error, NM_CRYPTO_ERROR,
 		             NM_CRYPTO_ERR_UNKNOWN_CIPHER,
 		             _("Private key cipher '%s' was unknown."),