diff options
author | Daniel Kahn Gillmor <[email protected]> | 2016-11-16 05:10:22 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-11-16 09:15:31 +0000 |
commit | 573064742145aa5f9bf04baa88af918c0c4d5e12 (patch) | |
tree | ba14bb77383d839f85ecc6fd30c716ff05e6505c /doc | |
parent | qt, cpp: Add cmake config files for w32 (diff) | |
download | gpgme-573064742145aa5f9bf04baa88af918c0c4d5e12.tar.gz gpgme-573064742145aa5f9bf04baa88af918c0c4d5e12.zip |
doc,tests: Require use of ctx_flag before use of session_key.
* doc/gpgme.texi: Document requirements of verifying that it is OK to
use session_key.
* tests/run-decrypt.c: Ensure that we fail if we're unable to access
the session key, so that we do not violate the guidance above.
Signed-off-by: Daniel Kahn Gillmor <[email protected]>
Changed the description
-@code{gpgme_set_ctx_flag (ctx, "export-session-key")} returns
-@code{GPG_ERR_NO_ERROR} or @code{gpgme_get_ctx_flag (ctx,
-"export-session-key")} returns @code{"1"}.
+@code{gpgme_set_ctx_flag (ctx, "export-session-key")} returns success
+or @code{gpgme_get_ctx_flag (ctx, "export-session-key")} returns true
+(non-empty string).
to get gpgme_get_ctx_flag for boolean values in sync with its own
description.
Note that I don't agree with the above suggestion but it does not
really harm to have it in the man page.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/gpgme.texi | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/gpgme.texi b/doc/gpgme.texi index fd396e02..4f899a9e 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -4814,6 +4814,11 @@ set to export session keys (see @code{gpgme_set_ctx_flag, "export-session-key"}), and a session key was available for the most recent decryption operation. Otherwise, this is a null pointer. +You must not try to access this member of the struct unless +@code{gpgme_set_ctx_flag (ctx, "export-session-key")} returns success +or @code{gpgme_get_ctx_flag (ctx, "export-session-key")} returns true +(non-empty string). + @end table @end deftp |