diff options
author | Andre Heinecke <[email protected]> | 2018-07-04 13:39:01 +0000 |
---|---|---|
committer | Andre Heinecke <[email protected]> | 2018-07-05 09:29:36 +0000 |
commit | a2458806f8bf04b66795e1dde765b42fe1ef6797 (patch) | |
tree | 0eebff2f24f9f8bfdce1871b4041bccd293773d9 /src/gpgme.h.in | |
parent | cpp: Fix memory of DecryptionResult::symkeyAlgo (diff) | |
download | gpgme-a2458806f8bf04b66795e1dde765b42fe1ef6797.tar.gz gpgme-a2458806f8bf04b66795e1dde765b42fe1ef6797.zip |
core: Add gpg auditlog to get diagnostics
* src/engine-gpg.c (engine_gpg): Add diagnostics member.
(gpg_release): Release diagnostics data.
(gpg_new): Set up logger-fd and diagnostics.
(gpg_getauditlog): New. Copy diagnostics to a user data.
(engine_ops): Add getauditlog.
* src/engine-gpgsm.c (gpgsm_getauditlog): Return not implemented
for GPGME_AUDITLOG_DIAG.
* src/getauditlog.c (getauditlog_start): Don't reset engine
for diagnostics.
* src/gpgme.h.in (GPGME_AUDITLOG_DIAG): New.
(GPGME_AUDITLOG_DEFAULT): New alias to 0.
* tests/run-decrypt.c (show_usage, main): Add --diagnostics.
* doc/gpgme.texi(Additional Logs): Document getauditlog.
--
This enables users of GPGME to get more verbose information
from gpg which can assist users in figuring out a problem
that was before hidden behind a generalized error like
"Decryption Failed".
For GPGSM it is not yet available as it is problematic to
get it properly in server mode and GPGSM already had the
original audit log mechanism in place.
GPGME_AUDITLOG_DEFAULT was added for a more explicit
documentation.
Diffstat (limited to 'src/gpgme.h.in')
-rw-r--r-- | src/gpgme.h.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 5279f6a2..421199a9 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -404,7 +404,9 @@ typedef unsigned int gpgme_export_mode_t; /* Flags for the audit log functions. */ +#define GPGME_AUDITLOG_DEFAULT 0 #define GPGME_AUDITLOG_HTML 1 +#define GPGME_AUDITLOG_DIAG 2 #define GPGME_AUDITLOG_WITH_HELP 128 |