summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-01-01 23:47:53 +0100
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-01-02 07:30:42 +0000
commit26b54b267d48ffdf9eb0d9d4f229b374483adf25 (patch)
tree22e60ab545c4fe01a78569e8105f4bf679093807
parent22bf0f39ef2b01e4515f1a1a5b0ef42a303de3a9 (diff)
downloadvyos-1x-26b54b267d48ffdf9eb0d9d4f229b374483adf25.tar.gz
vyos-1x-26b54b267d48ffdf9eb0d9d4f229b374483adf25.zip
wireguard: T3642: use base64 validator
(cherry picked from commit a232b83601f4f8b2fe6964239a568acad3fa764a)
-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">