diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-07-22 09:16:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-22 09:16:30 +0200 |
commit | e09dd24cd1d7c1076dca2b30b224e17b9ae28e3a (patch) | |
tree | f42f7d9f65cdbf0b832373e68fd71e253a69f452 /python/vyos/pki.py | |
parent | 936b36fdf180fce830dbc388ec5e8fc35feb9474 (diff) | |
parent | a9e9c4acfa90fc15a8a4b6b5ea6e1c2814ce940e (diff) | |
download | vyos-1x-e09dd24cd1d7c1076dca2b30b224e17b9ae28e3a.tar.gz vyos-1x-e09dd24cd1d7c1076dca2b30b224e17b9ae28e3a.zip |
Merge pull request #934 from sarthurdev/pki_openvpn
pki: openvpn: T3642: Migrate OpenVPN to PKI and refactor
Diffstat (limited to 'python/vyos/pki.py')
-rw-r--r-- | python/vyos/pki.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/python/vyos/pki.py b/python/vyos/pki.py index 1c6282d84..68ad73bf2 100644 --- a/python/vyos/pki.py +++ b/python/vyos/pki.py @@ -43,6 +43,8 @@ CSR_BEGIN='-----BEGIN CERTIFICATE REQUEST-----\n' CSR_END='\n-----END CERTIFICATE REQUEST-----' DH_BEGIN='-----BEGIN DH PARAMETERS-----\n' DH_END='\n-----END DH PARAMETERS-----' +OVPN_BEGIN = '-----BEGIN OpenVPN Static key V{0}-----\n' +OVPN_END = '\n-----END OpenVPN Static key V{0}-----' # Print functions @@ -227,6 +229,9 @@ def wrap_crl(raw_data): def wrap_dh_parameters(raw_data): return DH_BEGIN + raw_data + DH_END +def wrap_openvpn_key(raw_data, version='1'): + return OVPN_BEGIN.format(version) + raw_data + OVPN_END.format(version) + # Load functions def load_public_key(raw_data, wrap_tags=True): |