Skip to content
Snippets Groups Projects
Commit a895b0c4 authored by cyberta's avatar cyberta Committed by cyberta
Browse files

Switch to PKCS8 encoding of ecdsa private keys to keep it aligned with ed25519...

Switch to PKCS8 encoding of ecdsa private keys to keep it aligned with ed25519 private keys. This fixes ecdsa key handling on Android clients
parent b8ad7033
No related branches found
No related tags found
1 merge request!63fix apiv5 openvpn cert and key configs
...@@ -105,7 +105,7 @@ func (r *registry) CertWriter(ovpnCaCrt string, ovpnCaKey string, algo string, e ...@@ -105,7 +105,7 @@ func (r *registry) CertWriter(ovpnCaCrt string, ovpnCaKey string, algo string, e
return "", err return "", err
} }
// Write the private key // Write the private key
keyBytes, err := x509.MarshalECPrivateKey(priv) keyBytes, err := x509.MarshalPKCS8PrivateKey(priv)
if err != nil { if err != nil {
return "", err return "", err
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment