From 7f1d08cf21e97f5e60d4636bb1e6c287c34ee2df Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 7 Aug 2012 14:23:24 +0200 Subject: Imported Upstream version 0.9.5.96 --- libnm-util/nm-utils.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'libnm-util/nm-utils.c') 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; -- cgit 1.3.0-6-gf8a5