gpg: Disable compliance module for other GnuPG components.
authorJustus Winter <justus@g10code.com>
Mon, 19 Jun 2017 09:00:04 +0000 (11:00 +0200)
committerJustus Winter <justus@g10code.com>
Mon, 19 Jun 2017 09:00:04 +0000 (11:00 +0200)
commit6e23416fe61d4130918f2d1bf6e1f98d102c4610
tree0fa8951fd4f6d121cb74e61c44afce304f845b3e
parent9b12b45aa5e67d4d422bf75a3879df1d52dbe67f
gpg: Disable compliance module for other GnuPG components.

* common/compliance.c (gnupg_{pk,cipher,digest}_is_compliant): Return
false if the module is not initialized.
(gnupg_{pk,cipher,digest}_is_allowed): Return true if the module is
not initialized.
(gnupg_status_compliance_flag): Do not assert that the module is
initialized.
(gnupg_parse_compliance_option): Likewise.
(gnupg_compliance_option_string): Likewise.
--

This implements a default policy for modules not explicitly using the
compliance module.  The default policy is to allow all algorithms, but
mark none of them as compliant.

Fixes gpgv.

GnuPG-bug-id: 3210
Signed-off-by: Justus Winter <justus@g10code.com>
common/compliance.c