Page MenuHomeVyOS Platform

PKI import OpenVPN shared key includes unexpected BEGIN and END
Closed, ResolvedPublicBUG

Description

PKI import OpenVPN shared key includes BEGIN and END
A key

vyos@r4# cat /config/auth/foo.key 
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
6bc8ba8bb6234c9adaa755ba94303970
d5f9486d4b2d1b7b2851e49e5b7b648f
82fc9c80bc79cf77a98de8d9afb4add5
a8ae2c14befe9da7d8eebdd138759466
54e9bdc2f4ddf25ec46d15e6230df2d6
d85ebc30f634bb07dddc3ce375cd699d
fefb95029bf0396a9f9873c203aa4ebf
10a96b9e102f455bef67c62479a2f19f
9abc53d4ce3bbf4db4cf354b4885d59d
456a05368f70a0c0a413b5109db8a984
a5d9a33af99e137e9dd55a69413d94b1
9b9c6db3537fb3207ed5b36477e41948
e13f7def87312f3aefcd08573c4ad11c
27bb7ff5d26b752bdeba595ac914d6bb
81b56b9831779c415f43ae4d9c0db361
455e917a5db6c84019edeeb58ef78490
-----END OpenVPN Static key V1-----

Try to import

vyos@r4# run import pki openvpn shared-secret foo file /config/auth/foo.key
2 value(s) installed. Use "compare" to see the pending changes, and "commit" to apply.
[edit]
vyos@r4# 
[edit]
vyos@r4# compare 
[pki]
+ openvpn {
+     shared-secret foo {
+         key "# 2048 bit OpenVPN static key#-----BEGIN OpenVPN Static key V1-----6bc8ba8bb6234c9adaa755ba94303970d5f9486d4b2d1b7b2851e49e5b7b648f82fc9c80bc79cf77a98de8d9afb4add5a8ae2c14befe9da7d8eebdd13875946654e9bdc2f4ddf25ec46d15e6230df2d6d85ebc30f634bb07dddc3ce375cd699dfefb95029bf0396a9f9873c203aa4ebf10a96b9e102f455bef67c62479a2f19f9abc53d4ce3bbf4db4cf354b4885d59d456a05368f70a0c0a413b5109db8a984a5d9a33af99e137e9dd55a69413d94b19b9c6db3537fb3207ed5b36477e41948e13f7def87312f3aefcd08573c4ad11c27bb7ff5d26b752bdeba595ac914d6bb81b56b9831779c415f43ae4d9c0db361455e917a5db6c84019edeeb58ef78490-----END OpenVPN Static key V1-----"
+         version "1"
+     }
+ }

Unexpected values in the key config

# 2048 bit OpenVPN static key#-----BEGIN OpenVPN Static key V1----xxxxxxxx----END OpenVPN Static key V1-----

Details

Version
VyOS 1.5-rolling-202311150859
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav changed the task status from Open to Needs testing.Jan 20 2024, 1:53 PM
Viacheslav triaged this task as Normal priority.
natali-rs1985 changed the task status from Needs testing to In progress.Jul 25 2024, 9:56 AM
natali-rs1985 claimed this task.
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
dmbaturin moved this task from Open to Finished on the VyOS 1.5 Circinus board.
dmbaturin renamed this task from PKI import OpenVPN shared key includess unexpected BEGIN and END to PKI import OpenVPN shared key includes unexpected BEGIN and END.Jul 11 2025, 6:54 PM