summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2023-08-10 14:06:19 -0500
committerJohn Estabrook <jestabro@vyos.io>2023-08-10 14:06:19 -0500
commit0a9b8069155c8787df1d82523de7d8437c59e701 (patch)
tree7371a96d71d9b11d7ee6e31487f5cc8324641e7f /src
parenta34cd5dac7d37336721590b32ac56459acbed658 (diff)
downloadvyos-1x-0a9b8069155c8787df1d82523de7d8437c59e701.tar.gz
vyos-1x-0a9b8069155c8787df1d82523de7d8437c59e701.zip
T5434: use auto-defaults in op-mode pki.py
Diffstat (limited to 'src')
-rwxr-xr-xsrc/op_mode/pki.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/op_mode/pki.py b/src/op_mode/pki.py
index f638c51bc..aff4ad1ae 100755
--- a/src/op_mode/pki.py
+++ b/src/op_mode/pki.py
@@ -26,7 +26,6 @@ from cryptography.x509.oid import ExtendedKeyUsageOID
from vyos.config import Config
from vyos.configquery import ConfigTreeQuery
-from vyos.configdict import dict_merge
from vyos.pki import encode_certificate, encode_public_key, encode_private_key, encode_dh_parameters
from vyos.pki import get_certificate_fingerprint
from vyos.pki import create_certificate, create_certificate_request, create_certificate_revocation_list
@@ -39,7 +38,6 @@ from vyos.utils.io import ask_input
from vyos.utils.io import ask_yes_no
from vyos.utils.misc import install_into_config
from vyos.utils.process import cmd
-from vyos.xml import defaults
CERT_REQ_END = '-----END CERTIFICATE REQUEST-----'
auth_dir = '/config/auth'
@@ -50,10 +48,9 @@ def get_default_values():
# Fetch default x509 values
base = ['pki', 'x509', 'default']
x509_defaults = conf.get_config_dict(base, key_mangling=('-', '_'),
+ no_tag_node_value_mangle=True,
get_first_key=True,
- no_tag_node_value_mangle=True)
- default_values = defaults(base)
- x509_defaults = dict_merge(default_values, x509_defaults)
+ with_recursive_defaults=True)
return x509_defaults