diff options
author | Kim <kim.sidney@gmail.com> | 2021-10-07 16:52:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-07 16:52:56 +0200 |
commit | 2274dbf9047493a00a6f30346b38dacd8cfcf965 (patch) | |
tree | f431f5f6f1b2770c98ed9047e1cec9209e536366 /op-mode-definitions/pki.xml.in | |
parent | 2acfffab8b98238e7d869673a858a4ae21651f0b (diff) | |
parent | adc7ef387d40e92bd7163ee6b401e99e554394a3 (diff) | |
download | vyos-1x-2274dbf9047493a00a6f30346b38dacd8cfcf965.tar.gz vyos-1x-2274dbf9047493a00a6f30346b38dacd8cfcf965.zip |
Merge branch 'current' into 2fa
Diffstat (limited to 'op-mode-definitions/pki.xml.in')
-rw-r--r-- | op-mode-definitions/pki.xml.in | 153 |
1 files changed, 72 insertions, 81 deletions
diff --git a/op-mode-definitions/pki.xml.in b/op-mode-definitions/pki.xml.in index a11814c8a..a1c55dcf4 100644 --- a/op-mode-definitions/pki.xml.in +++ b/op-mode-definitions/pki.xml.in @@ -282,60 +282,66 @@ </node> <node name="wireguard"> <properties> - <help>Generate Wireguard keys</help> + <help>Generate WireGuard keys</help> </properties> <children> <node name="key-pair"> <properties> - <help>Generate Wireguard key pair for use with server or peer</help> + <help>Generate WireGuard public/private key-pair</help> </properties> <children> - <tagNode name="file"> - <properties> - <help>Write generated Wireguard keys into the specified filename</help> - <completionHelp> - <list><filename></list> - </completionHelp> - </properties> - <command>sudo ${vyos_op_scripts_dir}/pki.py --action generate --wireguard --key "$6" --file</command> - </tagNode> - <tagNode name="install"> + <node name="install"> <properties> - <help>Commands for installing generated Wireguard key into running configuration</help> - <completionHelp> - <list><interface> <peer></list> - </completionHelp> + <help>Generate CLI commands to install WireGuard key to configuration</help> </properties> - <command>sudo ${vyos_op_scripts_dir}/pki.py --action generate --wireguard --key "$6" --install</command> - </tagNode> + <children> + <tagNode name="interface"> + <properties> + <help>WireGuard Interface used in install command</help> + <completionHelp> + <path>interfaces wireguard</path> + </completionHelp> + </properties> + <command>sudo ${vyos_op_scripts_dir}/pki.py --action generate --wireguard --key --interface "$7" --install</command> + </tagNode> + </children> + </node> </children> - <command>sudo ${vyos_op_scripts_dir}/pki.py --action generate --wireguard --key "noname"</command> + <command>sudo ${vyos_op_scripts_dir}/pki.py --action generate --wireguard --key</command> </node> - <node name="pre-shared-key"> + <node name="preshared-key"> <properties> - <help>Generate pre-shared key for use with a Wireguard peer</help> + <help>Generate WireGuard pre-shared key</help> </properties> <children> - <tagNode name="file"> + <node name="install"> <properties> - <help>Write generated Wireguard PSK into the specified filename</help> - <completionHelp> - <list><filename></list> - </completionHelp> + <help>Generate CLI commands to install WireGuard key to configuration</help> </properties> - <command>sudo ${vyos_op_scripts_dir}/pki.py --action generate --wireguard --psk "$6" --file</command> - </tagNode> - <tagNode name="install"> - <properties> - <help>Commands for installing generated Wireguard PSK on specified peer into running configuration</help> - <completionHelp> - <list><peer></list> - </completionHelp> - </properties> - <command>sudo ${vyos_op_scripts_dir}/pki.py --action generate --wireguard --psk "$6" --install</command> - </tagNode> + <children> + <tagNode name="interface"> + <properties> + <help>WireGuard Interface used in install command</help> + <completionHelp> + <path>interfaces wireguard</path> + </completionHelp> + </properties> + <children> + <tagNode name="peer"> + <properties> + <help>Interface used for install command</help> + <completionHelp> + <path>interfaces wireguard ${COMP_WORDS[COMP_CWORD-2]} peer</path> + </completionHelp> + </properties> + <command>sudo ${vyos_op_scripts_dir}/pki.py --action generate --wireguard --psk --interface "$7" --peer "$9" --install</command> + </tagNode> + </children> + </tagNode> + </children> + </node> </children> - <command>sudo ${vyos_op_scripts_dir}/pki.py --action generate --wireguard --psk "noname"</command> + <command>sudo ${vyos_op_scripts_dir}/pki.py --action generate --wireguard --psk</command> </node> </children> </node> @@ -347,60 +353,45 @@ <children> <node name="pki"> <properties> - <help>Show PKI certificates</help> + <help>Show PKI x509 certificates</help> </properties> <children> - <node name="ca"> + <leafNode name="ca"> <properties> - <help>Show CA certificates</help> + <help>Show x509 CA certificates</help> </properties> - <children> - <leafNode name="name"> - <properties> - <help>Show CA certificate by name</help> - <completionHelp> - <path>pki ca</path> - </completionHelp> - </properties> - <command>sudo ${vyos_op_scripts_dir}/pki.py --action show --ca "$5"</command> - </leafNode> - </children> <command>sudo ${vyos_op_scripts_dir}/pki.py --action show --ca "all"</command> - </node> - <node name="certificate"> + </leafNode> + <tagNode name="ca"> <properties> - <help>Show certificates</help> + <help>Show x509 CA certificate by name</help> + <completionHelp> + <path>pki ca</path> + </completionHelp> + </properties> + <command>sudo ${vyos_op_scripts_dir}/pki.py --action show --ca "$4"</command> + </tagNode> + <leafNode name="certificate"> + <properties> + <help>Show x509 certificates</help> </properties> - <children> - <leafNode name="name"> - <properties> - <help>Show certificate by name</help> - <completionHelp> - <path>pki certificate</path> - </completionHelp> - </properties> - <command>sudo ${vyos_op_scripts_dir}/pki.py --action show --certificate "$5"</command> - </leafNode> - </children> <command>sudo ${vyos_op_scripts_dir}/pki.py --action show --certificate "all"</command> - </node> - <node name="crl"> + </leafNode> + <tagNode name="certificate"> <properties> - <help>Show certificate revocation lists</help> + <help>Show x509 certificate by name</help> + <completionHelp> + <path>pki certificate</path> + </completionHelp> + </properties> + <command>sudo ${vyos_op_scripts_dir}/pki.py --action show --certificate "$4"</command> + </tagNode> + <leafNode name="crl"> + <properties> + <help>Show x509 certificate revocation lists</help> </properties> - <children> - <leafNode name="name"> - <properties> - <help>Show certificate revocation lists from specified CA</help> - <completionHelp> - <path>pki ca</path> - </completionHelp> - </properties> - <command>sudo ${vyos_op_scripts_dir}/pki.py --action show --crl "$5"</command> - </leafNode> - </children> <command>sudo ${vyos_op_scripts_dir}/pki.py --action show --crl "all"</command> - </node> + </leafNode> </children> <command>sudo ${vyos_op_scripts_dir}/pki.py --action show</command> </node> |