summaryrefslogtreecommitdiff
path: root/interface-definitions/interfaces_wireguard.xml.in
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-01-02 00:16:20 +0000
committerGitHub <noreply@github.com>2024-01-02 00:16:20 +0000
commit547b9eabeb45cb74db002050fba0093210940792 (patch)
tree7fd8b609b166e0b5111dfe26737fbd7511ecd707 /interface-definitions/interfaces_wireguard.xml.in
parentfc0fe0e0ed37e987e0fbf5c4fe9dad40e50a4a73 (diff)
parent679be4c9742ffd5c317742c6c20a268a5e044f0c (diff)
downloadvyos-1x-547b9eabeb45cb74db002050fba0093210940792.tar.gz
vyos-1x-547b9eabeb45cb74db002050fba0093210940792.zip
Merge pull request #2739 from c-po/cli-validators-base64
T3642: add missing base64 CLI validators
Diffstat (limited to 'interface-definitions/interfaces_wireguard.xml.in')
-rw-r--r--interface-definitions/interfaces_wireguard.xml.in12
1 files changed, 6 insertions, 6 deletions
diff --git a/interface-definitions/interfaces_wireguard.xml.in b/interface-definitions/interfaces_wireguard.xml.in
index f3fe0f1da..fba1064ef 100644
--- a/interface-definitions/interfaces_wireguard.xml.in
+++ b/interface-definitions/interfaces_wireguard.xml.in
@@ -44,9 +44,9 @@
<properties>
<help>Base64 encoded private key</help>
<constraint>
- <regex>[0-9a-zA-Z\+/]{43}=</regex>
+ <validator name="base64"/>
</constraint>
- <constraintErrorMessage>Key is not valid 44-character (32-bytes) base64</constraintErrorMessage>
+ <constraintErrorMessage>Key is not base64-encoded</constraintErrorMessage>
</properties>
</leafNode>
<tagNode name="peer">
@@ -64,18 +64,18 @@
<properties>
<help>base64 encoded public key</help>
<constraint>
- <regex>[0-9a-zA-Z\+/]{43}=</regex>
+ <validator name="base64"/>
</constraint>
- <constraintErrorMessage>Key is not valid 44-character (32-bytes) base64</constraintErrorMessage>
+ <constraintErrorMessage>Key is not base64-encoded</constraintErrorMessage>
</properties>
</leafNode>
<leafNode name="preshared-key">
<properties>
<help>base64 encoded preshared key</help>
<constraint>
- <regex>[0-9a-zA-Z\+/]{43}=</regex>
+ <validator name="base64"/>
</constraint>
- <constraintErrorMessage>Key is not valid 44-character (32-bytes) base64</constraintErrorMessage>
+ <constraintErrorMessage>Key is not base64-encoded</constraintErrorMessage>
</properties>
</leafNode>
<leafNode name="allowed-ips">