mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpgsm: New option --require-compliance
* sm/gpgsm.c (oRequireCompliance): New. (opts): Add --require-compliance. (main): Set option. * sm/gpgsm.h (opt): Add field require_compliance. (gpgsm_errors_seen): Declare. * sm/verify.c (gpgsm_verify): Emit error if non de-vs compliant. * sm/encrypt.c (gpgsm_encrypt): Ditto. * sm/decrypt.c (gpgsm_decrypt): Ditto.
This commit is contained in:
parent
17890d4318
commit
847d618454
6 changed files with 47 additions and 3 deletions
|
@ -1029,7 +1029,13 @@ gpgsm_decrypt (ctrl_t ctrl, int in_fd, estream_t out_fp)
|
|||
&& gnupg_gcrypt_is_compliant (CO_DE_VS))
|
||||
gpgsm_status (ctrl, STATUS_DECRYPTION_COMPLIANCE_MODE,
|
||||
gnupg_status_compliance_flag (CO_DE_VS));
|
||||
|
||||
else if (opt.require_compliance
|
||||
&& opt.compliance == CO_DE_VS)
|
||||
{
|
||||
log_error (_("operation forced to fail due to"
|
||||
" unfulfilled compliance rules\n"));
|
||||
gpgsm_errors_seen = 1;
|
||||
}
|
||||
}
|
||||
audit_log_ok (ctrl->audit, AUDIT_RECP_RESULT, rc);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue