Added /pgp libver command

This commit is contained in:
James Booth
2015-03-22 00:29:57 +00:00
parent 1d90cc7894
commit fd86615549
5 changed files with 34 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -37,5 +37,6 @@
void p_gpg_init(void);
GSList* p_gpg_list_keys(void);
char* p_gpg_libver(void);
#endif