David Maus

Neues TLS-Zertifikat auf Devuan installieren

Kürzlich habe ich fortext.net dem Feed-Aggregator Planet Digital Humanities hinzugefügt und wurde beim Aktualisieren des Aggregators von einer Fehlermeldung überrascht.

Etwas irreführende Fehlermeldung vom Planeten
dmaus@dmaus:~/planet-dh$ /usr/bin/planet config.iniERROR:planet.runner:Error 500 while updating feed https://fortext.net/rss.xml

Die Fehlerangabe Error 500 ließ zunächst ein Problem auf der Seite von fortext vermuten, da 500 der HTTP Fehlercode für serverseitige Fehler ist. Beim Versuch, den Fehler mit curl zu debuggen bin ich dann aber auf ein fehlendes TLS-Zertifikat gestoßen.

Dem Problem mit curl auf der Spur
dmaus@dmaus:~/planet-dh$ curl https://fortext.netcurl: (60) SSL certificate problem: unable to get local issuer certificateMore details here: https://curl.haxx.se/docs/sslcerts.htmlcurl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option.If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL).If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.

Nach etwas Recherche habe ich herausgefunden, dass das fehlende Zertifikat Encryption Everywhere DV TLS CA - G1 auf der Seite von DigiCert heruntergeladen werden kann. Gesagt, getan. Dann habe ich das Zertifikat wie folgt installiert.

Zertifikat umwandeln und installieren
dmaus@dmaus:~/planet-dh$ mv EncryptionEverywhereDVTLSCA-G1.crt EncryptionEverywhereDVTLSCA-G1.derdmaus@dmaus:~/planet-dh$ openssl x509 -in EncryptionEverywhereDVTLSCA-G1.crt -inform DER -out rEncryptionEverywhereDVTLSCA-G1.crtdmaus@dmaus:~/planet-dh$ sudo cp EncryptionEverywhereDVTLSCA-G1.crt /usr/local/share/ca-certificates/dmaus@dmaus:~/planet-dh$ sudo update-ca-certificatesdmaus@dmaus:~/planet-dh$ rm EncryptionEverywhereDVTLSCA-G1.*