summaryrefslogtreecommitdiffstats
path: root/sm/decrypt.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2019-08-05 03:09:41 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2019-08-05 03:15:08 +0200
commitef2424144a070c9199e40424ec8d9b5a9919aa72 (patch)
tree20ec5b66c4730643f0ceccde40e422657d579bc1 /sm/decrypt.c
parentsm: Fix error checking of decryption result. (diff)
downloadgnupg2-ef2424144a070c9199e40424ec8d9b5a9919aa72.tar.xz
gnupg2-ef2424144a070c9199e40424ec8d9b5a9919aa72.zip
sm: Support AES-256 key.
* sm/decrypt.c (prepare_decryption): Handle a case for AES-256. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'sm/decrypt.c')
-rw-r--r--sm/decrypt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sm/decrypt.c b/sm/decrypt.c
index ec9800840..02b5509e6 100644
--- a/sm/decrypt.c
+++ b/sm/decrypt.c
@@ -75,10 +75,10 @@ prepare_decryption (ctrl_t ctrl, const char *hexkeygrip, const char *desc,
log_printhex (seskey, seskeylen, "pkcs1 encoded session key:");
n=0;
- if (seskeylen == 24 || seskeylen == 16)
+ if (seskeylen == 32 || seskeylen == 24 || seskeylen == 16)
{
- /* Smells like a 3-DES or AES-128 key. This might happen
- * because a SC has already done the unpacking. A better
+ /* Smells like an AES-128, 3-DES, or AES-256 key. This might
+ * happen because a SC has already done the unpacking. A better
* solution would be to test for this only after we triggered
* the GPG_ERR_INV_SESSION_KEY. */
}