fix(config): per-domain configuration (e.g. submission-address) was not loaded.

This commit is contained in:
s3lph 2022-12-21 03:10:52 +01:00
parent b396a2c01c
commit ea451639e6
2 changed files with 4 additions and 4 deletions

View file

@ -52,7 +52,7 @@ easywksserver_gpgwksclient:
mailing_method: stdout mailing_method: stdout
domains: domains:
example.org: example.org:
submission_address: gpgwks@example.org submission_address: webkey@example.org
EOF EOF
- easywks --config /tmp/easywks.yml init - easywks --config /tmp/easywks.yml init
- easywks --config /tmp/easywks.yml webserver & - easywks --config /tmp/easywks.yml webserver &
@ -64,7 +64,7 @@ easywksserver_gpgwksclient:
- >- - >-
export FINGERPRINT="$(gpg --with-colons --fingerprint alice@example.org | grep -A1 ^pub | grep ^fpr | cut -d: -f10)" export FINGERPRINT="$(gpg --with-colons --fingerprint alice@example.org | grep -A1 ^pub | grep ^fpr | cut -d: -f10)"
- /usr/lib/gnupg/gpg-wks-client --supported alice@example.org - /usr/lib/gnupg/gpg-wks-client --supported alice@example.org
- /usr/lib/gnupg/gpg-wks-client --check gpgwks@example.org - /usr/lib/gnupg/gpg-wks-client --check webkey@example.org
- PUBREQ="$(/usr/lib/gnupg/gpg-wks-client --create "${FINGERPRINT}" alice@example.org)" - PUBREQ="$(/usr/lib/gnupg/gpg-wks-client --create "${FINGERPRINT}" alice@example.org)"
- CONFREQ="$(echo "${PUBREQ}" | easywks --config /tmp/easywks.yml process)" - CONFREQ="$(echo "${PUBREQ}" | easywks --config /tmp/easywks.yml process)"
- CONFRESP="$(echo "${CONFREQ}" | /usr/lib/gnupg/gpg-wks-client --receive --verbose)" - CONFRESP="$(echo "${CONFREQ}" | /usr/lib/gnupg/gpg-wks-client --receive --verbose)"

View file

@ -173,7 +173,7 @@ class _GlobalConfig(_Config):
def __make_domain(self, domain): def __make_domain(self, domain):
self.__domains[domain] = _Config( self.__domains[domain] = _Config(
submission_address=_ConfigOption('address', str, f'gpgwks@{domain}'), submission_address=_ConfigOption('submission_address', str, f'gpgwks@{domain}'),
passphrase=_ConfigOption('passphrase', str, ''), passphrase=_ConfigOption('passphrase', str, ''),
policy_flags=_ConfigOption('policy_flags', dict, {}, validator=_validate_policy_flags) policy_flags=_ConfigOption('policy_flags', dict, {}, validator=_validate_policy_flags)
) )
@ -194,7 +194,7 @@ class _GlobalConfig(_Config):
for domain, dconf in conf['domains'].items(): for domain, dconf in conf['domains'].items():
self.__make_domain(domain) self.__make_domain(domain)
for co in self.__domains[domain]._options.values(): for co in self.__domains[domain]._options.values():
co.load(conf) co.load(dconf)
Config = _GlobalConfig( Config = _GlobalConfig(