diff options
author | Werner Koch <[email protected]> | 2022-08-29 11:07:43 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2022-08-29 11:07:43 +0000 |
commit | 5b24c41ba72c2d06f6acc7c2ad51cf6f384d41d8 (patch) | |
tree | 4a5c677e0415f02c1fc7804c38f6e3c8d334d8df | |
parent | g10/decrypt-data: disable output estream buffering to reduce overhead (diff) | |
download | gnupg-5b24c41ba72c2d06f6acc7c2ad51cf6f384d41d8.tar.gz gnupg-5b24c41ba72c2d06f6acc7c2ad51cf6f384d41d8.zip |
gpg: Very minor cleanup in decrypt_data.
* g10/decrypt-data.c (decrypt_data): Show also the aead algo with
--show-session-key. Remove meanwhile superfluous NULL-ptr test.
-rw-r--r-- | g10/decrypt-data.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/g10/decrypt-data.c b/g10/decrypt-data.c index 07f644512..0046c350e 100644 --- a/g10/decrypt-data.c +++ b/g10/decrypt-data.c @@ -284,7 +284,10 @@ decrypt_data (ctrl_t ctrl, void *procctx, PKT_encrypted *ed, DEK *dek, char numbuf[25]; char *hexbuf; - snprintf (numbuf, sizeof numbuf, "%d:", dek->algo); + if (ed->aead_algo) + snprintf (numbuf, sizeof numbuf, "%d.%u:", dek->algo, ed->aead_algo); + else + snprintf (numbuf, sizeof numbuf, "%d:", dek->algo); hexbuf = bin2hex (dek->key, dek->keylen, NULL); if (!hexbuf) { @@ -486,6 +489,7 @@ decrypt_data (ctrl_t ctrl, void *procctx, PKT_encrypted *ed, DEK *dek, { char *filename = NULL; estream_t fp; + rc = get_output_file ("", 0, ed->buf, &filename, &fp); if (! rc) { @@ -509,8 +513,7 @@ decrypt_data (ctrl_t ctrl, void *procctx, PKT_encrypted *ed, DEK *dek, filename, gpg_strerror (rc)); iobuf_close (output); - if (afx) - release_armor_context (afx); + release_armor_context (afx); } xfree (filename); } |