aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2026-04-23 14:29:53 +0200
committerWerner Koch <[email protected]>2026-04-23 14:29:53 +0200
commit63f18298d3f5c5f7551301b1e183890c503c644a (patch)
tree6f66b01d41bc7679272ac673e551cfef10d7357c /doc
parentindent: Align a debug output. (diff)
downloadgpgme-63f18298d3f5c5f7551301b1e183890c503c644a.tar.gz
gpgme-63f18298d3f5c5f7551301b1e183890c503c644a.zip
New decryption flag GPGME_DECRYPT_SESSION_HASH.
* src/gpgme.h.in (_gpgme_op_decrypt_result): Add field session_hash. (gpgme_decrypt_flags_t): Add flag GPGME_DECRYPT_SESSION_HASH. (gpgme_status_code_t): Add flags GPGME_STATUS_SESSION_HASH. * src/status-table.c (status_table): Add "SESSION_HASH". * src/decrypt.c (release_op_data): Free new field. (_gpgme_decrypt_status_handler): Handle new status code. * src/engine-gpg.c (gpg_decrypt): Implement GPGME_DECRYPT_SESSION_HASH. * tests/run-decrypt.c (print_result): Print session_hash. (main): Add option --show-session-hash.
Diffstat (limited to 'doc')
-rw-r--r--doc/gpgme.texi20
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index 5acefe24..7334d62a 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -5875,6 +5875,15 @@ used to information on the keyids of the recipients of some encrypted
data. Note that most other result items have no or no useful
information in this case.
+@item GPGME_DECRYPT_SESSION_HASH
+@since{2.1.0}
+
+If supported by gpg (>= 2.5.19) pass the option
+@option{--show-session-hash} to gpg so that the decryption result
+field @code{session_key} will receive the hash of the session key. If
+@code{GPGME_DECRYPT_LIST} is also set the gpg option
+@option{--show-only-session-key} is used instead.
+
@end table
The function returns the error codes as described for
@@ -5882,7 +5891,7 @@ The function returns the error codes as described for
@end deftypefun
@deftypefun gpgme_error_t gpgme_op_decrypt_ext_start ( @
- @w{gpgme_ctx_t @var{ctx}}, @
+ @w{gpgme_ctx_tng @var{ctx}}, @
@w{gpgme_decrypt_flags_t @var{flags}}, @
@w{gpgme_data_t @var{cipher}}, @
@w{gpgme_data_t @var{plain}})
@@ -5994,6 +6003,15 @@ A string with the symmetric encryption algorithm and mode using the
format "<algo>.<mode>". Note that the deprecated non-MDC encryption mode of
OpenPGP is given as "PGPCFB".
+@item char *session_hash
+@since{2.1.0}
+
+A textual representation (nul-terminated string) of the SHA-256 hash
+of the session key used in symmetric encryption of the message. It
+will receive the value @code{NULL} if the feature is not supported by
+the backend or the @code{GPGME_DECRYPT_SESSION_HASH} bit was not set
+in flags argument of the decryption function.
+
@end table
@end deftp