about summary refs log tree commit diff stats
path: root/src/pgp
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-03-22 00:29:57 +0000
committerJames Booth <boothj5@gmail.com>2015-03-22 00:29:57 +0000
commitfd86615549a76c050dbcb50deaefde199d8216c7 (patch)
tree18ef2d1310de2102e752205270af909a920bcada /src/pgp
parent1d90cc78949f2a26cc9eb847842149199225ff15 (diff)
downloadprofani-tty-fd86615549a76c050dbcb50deaefde199d8216c7.tar.gz
Added /pgp libver command
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