summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2021-06-02 19:14:37 +0200
committerWerner Koch <wk@gnupg.org>2021-06-02 19:14:37 +0200
commitc17dac5ac3ccb374e5a1276d4bc9b444c390a4c5 (patch)
tree0512680c5c96f8317cd0119b2a5277150b989a0e /common
parentsm: Support AES-GCM decryption. (diff)
downloadgnupg2-c17dac5ac3ccb374e5a1276d4bc9b444c390a4c5.tar.xz
gnupg2-c17dac5ac3ccb374e5a1276d4bc9b444c390a4c5.zip
common: Allow for GCM decryption in de-vs mode.
* common/compliance.c (gnupg_cipher_is_allowed): Allow GCM for gpgsm in decrypt mode. * tests/cms/samplemsgs/pwri-sample.gcm.p7m: Remove duplicated authtag -- We allow GCM in de-vs mode for decryption although this has not been evaluation. It is decryption and thus no serious harm may happen.
Diffstat (limited to 'common')
-rw-r--r--common/compliance.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/compliance.c b/common/compliance.c
index 217ed0997..6c2fcd5b3 100644
--- a/common/compliance.c
+++ b/common/compliance.c
@@ -416,7 +416,8 @@ gnupg_cipher_is_allowed (enum gnupg_compliance_mode compliance, int producer,
|| mode == GCRY_CIPHER_MODE_CFB);
case GNUPG_MODULE_NAME_GPGSM:
return (mode == GCRY_CIPHER_MODE_NONE
- || mode == GCRY_CIPHER_MODE_CBC);
+ || mode == GCRY_CIPHER_MODE_CBC
+ || (mode == GCRY_CIPHER_MODE_GCM && !producer));
}
log_assert (!"reached");