summary refs log tree commit diff
path: root/libnm-util/crypto.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2016-10-01 00:33:49 +0200
committerMichael Biebl <biebl@debian.org>2016-10-01 00:33:49 +0200
commit270c4830551c9810ad4e83f9a1db2b1cb946208c (patch)
tree5df09188f7e43b70896efb7b6e942e0b130d75d3 /libnm-util/crypto.c
parent7514efc2f38c9ace4557d4e69d68e7d380389030 (diff)
New upstream version 1.4.2 upstream/1.4.2
Diffstat (limited to 'libnm-util/crypto.c')
-rw-r--r--libnm-util/crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-util/crypto.c b/libnm-util/crypto.c
index 3dd89f95..9778edeb 100644
--- a/libnm-util/crypto.c
+++ b/libnm-util/crypto.c
@@ -708,7 +708,7 @@ crypto_verify_private_key_data (const GByteArray *contents,
 		/* Maybe it's PKCS#8 */
 		tmp = parse_pkcs8_key_file (contents, &is_encrypted, error);
 		if (tmp) {
-			if (crypto_verify_pkcs8 (tmp, is_encrypted, password, error))
+			if (!password || crypto_verify_pkcs8 (tmp, is_encrypted, password, error))
 				format = NM_CRYPTO_FILE_FORMAT_RAW_KEY;
 		} else {
 			g_clear_error (error);