From a895b0c4cb7b738bbd9df6e835227c80d603f51a Mon Sep 17 00:00:00 2001 From: cyBerta <cyberta@riseup.net> Date: Wed, 4 Dec 2024 03:35:03 +0100 Subject: [PATCH] Switch to PKCS8 encoding of ecdsa private keys to keep it aligned with ed25519 private keys. This fixes ecdsa key handling on Android clients --- pkg/api/cert.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/cert.go b/pkg/api/cert.go index 50d79d7..c61378c 100644 --- a/pkg/api/cert.go +++ b/pkg/api/cert.go @@ -105,7 +105,7 @@ func (r *registry) CertWriter(ovpnCaCrt string, ovpnCaKey string, algo string, e return "", err } // Write the private key - keyBytes, err := x509.MarshalECPrivateKey(priv) + keyBytes, err := x509.MarshalPKCS8PrivateKey(priv) if err != nil { return "", err } -- GitLab