diff options
author | Christian Breunig <christian@breunig.cc> | 2024-01-04 11:17:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-04 11:17:27 +0100 |
commit | 598fed91068401d5ed259ea742820248d851d246 (patch) | |
tree | 14ad877fe86882f8325f6bda83471197aecc6c45 /src/conf_mode/service_https.py | |
parent | 1cc70ce273cbddb5ea9eb4148808c6c2aaf3d28f (diff) | |
parent | 706fdbb234202723e02f93ad8eb724649181a60a (diff) | |
download | vyos-1x-598fed91068401d5ed259ea742820248d851d246.tar.gz vyos-1x-598fed91068401d5ed259ea742820248d851d246.zip |
Merge pull request #2751 from vyos/mergify/bp/sagitta/pr-2750
configdict: T5894: add get_config_dict() flag with_pki (backport #2750)
Diffstat (limited to 'src/conf_mode/service_https.py')
-rwxr-xr-x | src/conf_mode/service_https.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/conf_mode/service_https.py b/src/conf_mode/service_https.py index 3dc5dfc01..cb40acc9f 100755 --- a/src/conf_mode/service_https.py +++ b/src/conf_mode/service_https.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2019-2023 VyOS maintainers and contributors +# Copyright (C) 2019-2024 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -78,12 +78,7 @@ def get_config(config=None): diff = get_config_diff(conf) - https = conf.get_config_dict(base, get_first_key=True) - - if https: - https['pki'] = conf.get_config_dict(['pki'], key_mangling=('-', '_'), - no_tag_node_value_mangle=True, - get_first_key=True) + https = conf.get_config_dict(base, get_first_key=True, with_pki=True) https['children_changed'] = diff.node_changed_children(base) https['api_add_or_delete'] = diff.node_changed_presence(base + ['api']) @@ -119,7 +114,7 @@ def verify(https): if 'certificate' in certificates: if not https['pki']: - raise ConfigError("PKI is not configured") + raise ConfigError('PKI is not configured') cert_name = certificates['certificate'] |