gpgsm: Implement GCM encryption.
* sm/encrypt.c (struct dek_s): Add field 'mode'. (init_dek): Take the mode from DEK. (gpgsm_encrypt): Allocate the DEK earlier and set the mode from the cipher-algo option. Set content-type depending on the mode. Adjust compliance check. Handle the KSBA_SR_NEED_SIG event by setting the authtag.
This is the second part to implement GCM encryption. Note that GCM
decryption works since 2.3.2 (nearly 5 years ago). Note that libksba
1.7.0 is required for proper functioning; earlier versions will return
an error during encryption..
See-commit: 047d699aa40c6cd3f35c337091951b62adf32493
- GnuPG-bug-id: T3979