diff options
Diffstat (limited to 'libnm-util/nm-utils.c')
| -rw-r--r-- | libnm-util/nm-utils.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c index f76d0e10..65bbd253 100644 --- a/libnm-util/nm-utils.c +++ b/libnm-util/nm-utils.c @@ -21,7 +21,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * (C) Copyright 2005 - 2010 Red Hat, Inc. + * (C) Copyright 2005 - 2012 Red Hat, Inc. */ #include "config.h" @@ -2217,6 +2217,20 @@ out: return ret; } +/** + * nm_utils_file_is_pkcs12: + * @filename: name of the file to test + * + * Utility function to find out if the @filename is in PKCS#12 format. + * + * Returns: TRUE if the file is PKCS#12, FALSE if it is not + **/ +gboolean +nm_utils_file_is_pkcs12 (const char *filename) +{ + return crypto_is_pkcs12_file (filename, NULL); +} + /* Band, channel/frequency stuff for wireless */ struct cf_pair { guint32 chan; |