diff options
Diffstat (limited to 'libnm-util')
| -rw-r--r-- | libnm-util/crypto.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libnm-util/crypto.c b/libnm-util/crypto.c index 7fdf0f72..3dd89f95 100644 --- a/libnm-util/crypto.c +++ b/libnm-util/crypto.c @@ -654,6 +654,9 @@ crypto_is_pkcs12_data (const GByteArray *data) g_return_val_if_fail (data != NULL, FALSE); + if (!data->len) + return FALSE; + success = crypto_verify_pkcs12 (data, NULL, &error); if (success == FALSE) { /* If the error was just a decryption error, then it's pkcs#12 */ |