feat: fill certificate fields from uploaded certificate file

Parse uploaded PEM or DER certificates with cryptography and fill common
name, SANs, issuer, serial number, SHA-256 fingerprint and validity dates.
Name and type are only set when left empty; the type is derived from the
CA flag and extended key usage. Files containing a private key are
rejected. Works in the UI form and the REST API.

Adds cryptography as a dependency.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-10-21 14:16:58 +02:00
1 parent f296a576f2
commit 2a41118e8e
9 files changed
+228

No files matched your search

Binary file not shown.
@@ -546,3 +546,18 @@ msgstr "Common Name: %(name)s"
msgid "Issuer: %(issuer)s"
msgstr "Aussteller: %(issuer)s"
msgid "Taken from the certificate's common name if left empty"
msgstr "Wird aus dem Common Name des Zertifikats übernommen, wenn leer"
msgid "Enter a name or upload a certificate file."
msgstr "Bitte einen Namen eingeben oder eine Zertifikatsdatei hochladen."
msgid "PEM or DER file without private key. Common name, SANs, issuer, serial number, fingerprint and validity are filled in automatically."
msgstr "PEM- oder DER-Datei ohne privaten Schlüssel. Common Name, SANs, Aussteller, Seriennummer, Fingerabdruck und Gültigkeit werden automatisch ausgefüllt."
msgid "The file contains a private key. Please upload only the certificate without its private key."
msgstr "Die Datei enthält einen privaten Schlüssel. Bitte nur das Zertifikat ohne privaten Schlüssel hochladen."
msgid "The file is not a valid PEM or DER encoded X.509 certificate."
msgstr "Die Datei ist kein gültiges PEM- oder DER-kodiertes X.509-Zertifikat."