Skip to content

Key is not valid 44-character (32-bytes) base64 #138

Open
@drose12

Description

@drose12

Package version

1.0.20210914

Firmware version

v2.0.9-hotfix.4

Device

EdgeRouter X (SFP, 10 X, EP-R6) - e50

Issue description

Following: https://blog.usman.network/posts/wireguard-vpn-on-a-ubiquiti-edgerouter/

Using pkg e50-v2-v1.0.20210606-v1.0.20210914.deb

Steps to reproduce:

ubnt@erx:~/my_phone$ pwd
/home/ubnt/my_phone
ubnt@erx:~/my_phone$ wg genkey | tee privatekey | wg pubkey > publickey
ubnt@erx:~/my_phone$ cat publickey
7S3hnt/A96Vg9UUM5QBu9eSc2YhyLqzsx1sVVSMy5mc=
ubnt@erx:~/my_phone$ configure
[edit]
ubnt@erx# set interfaces wireguard wg0 peer /home/ubnt/my_phone/publickey
Key is not valid 44-character (32-bytes) base64

Value validation failed
Set failed
[edit]
ubnt@erx#

Code Location ?

Testing the key using the included script ?

ubnt@erx:~/my_phone$ bash -x /opt/wireguard/is_valid_key.sh /home/ubnt/my_phone/publickey
+ set -eEu -o pipefail
+ KEY=/home/ubnt/my_phone/publickey
+ '[' -e /home/ubnt/my_phone/publickey ']'
++ cat /home/ubnt/my_phone/publickey
+ KEY=7S3hnt/A96Vg9UUM5QBu9eSc2YhyLqzsx1sVVSMy5mc=
+ [[ 7S3hnt/A96Vg9UUM5QBu9eSc2YhyLqzsx1sVVSMy5mc= =~ ^[0-9a-zA-Z/+]{43}=$ ]]
+ exit 0

Configuration and log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions