diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2012-07-16 14:43:52 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2012-07-16 14:52:27 +0200 |
commit | 13c6db880345b4123fb75d00905a5addbd046f92 (patch) | |
tree | 183edab5472ef34c337bf7968939ea5a8bcc930e | |
parent | d0b90ece67a24cd4b77edf5144da27ba7fba870f (diff) | |
download | network-manager-applet-13c6db880345b4123fb75d00905a5addbd046f92.tar.gz |
editor: recognize PKCS#12 files exported from firefox (bgo #677881)
We test PKCS#12 format using crypto function of libnm-util, namely
nm_utils_file_is_pkcs12().
-rw-r--r-- | src/wireless-security/eap-method.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wireless-security/eap-method.c b/src/wireless-security/eap-method.c index 0129ef67..8976b1e1 100644 --- a/src/wireless-security/eap-method.c +++ b/src/wireless-security/eap-method.c @@ -18,7 +18,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * (C) Copyright 2007 - 2011 Red Hat, Inc. + * (C) Copyright 2007 - 2012 Red Hat, Inc. */ #include "config.h" @@ -35,6 +35,7 @@ #include <nm-setting-connection.h> #include <nm-setting-8021x.h> #include "eap-method.h" +#include "nm-utils.h" GType eap_method_get_g_type (void) @@ -609,7 +610,8 @@ default_filter_privkey (const GtkFileFilterInfo *filter_info, gpointer user_data if (!file_has_extension (filter_info->filename, extensions)) return FALSE; - if (!file_is_der_or_pem (filter_info->filename, TRUE, &is_encrypted)) + if ( !file_is_der_or_pem (filter_info->filename, TRUE, &is_encrypted) + && !nm_utils_file_is_pkcs12 (filter_info->filename)) return FALSE; return require_encrypted ? is_encrypted : TRUE; |