about summary refs log tree commit diff stats
path: root/src/pgp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pgp')
-rw-r--r--src/pgp/gpg.c13
-rw-r--r--src/pgp/gpg.h1
2 files changed, 12 insertions, 2 deletions
diff --git a/src/pgp/gpg.c b/src/pgp/gpg.c
index 2a9e6431..4b1b57c9 100644
--- a/src/pgp/gpg.c
+++ b/src/pgp/gpg.c
@@ -39,11 +39,13 @@
 
 #include "log.h"
 
+static const char *libversion;
+
 void
 p_gpg_init(void)
 {
-    char *version = gpgme_check_version (NULL);
-    log_debug("GPG: Found gpgme version: %s",version);
+    libversion = gpgme_check_version(NULL);
+    log_debug("GPG: Found gpgme version: %s", libversion);
     gpgme_set_locale(NULL, LC_CTYPE, setlocale(LC_CTYPE, NULL));
 }
 
@@ -79,3 +81,10 @@ p_gpg_list_keys(void)
 
     return result;
 }
+
+const char*
+p_gpg_libver(void)
+{
+    return libversion;
+}
+
diff --git a/src/pgp/gpg.h b/src/pgp/gpg.h
index 3dc256dc..9702e31a 100644
--- a/src/pgp/gpg.h
+++ b/src/pgp/gpg.h
@@ -37,5 +37,6 @@
 
 void p_gpg_init(void);
 GSList* p_gpg_list_keys(void);
+char* p_gpg_libver(void);
 
 #endif