You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Interoperability issue: PEM encoding for Ed25519 private keys #391
I would like to take the certificates managed by Caddy and use them under other software. However, the way CertMagic generates PEM files for Ed25519 keys is incompatible with modern versions of OpenSSL and this can be fixed with minimal changes.
I found the relevant line of code causing this issue, and it means that any Ed25519 private key file generated by CertMagic will have this issue:
(Since even the various OpenSSL forks try to maintain compatibility with OpenSSL, this is probably the documentation we should be following. LibreSSL appears to also share this problem, but I didn't check any other forks.)
Note that in all cases, the generated PEM includes the key type in the encoded data, and so, putting the key type in the header is technically redundant. OpenSSL actually accounts for this and allows just the following:
This feels like the appropriate way to solve the problem, since for example, the "public" key is just listed as CERTIFICATE, and the type isn't specified in the header. I'll submit a PR soon with this recommended change.
Activity