====== 3.4 Troubleshooting ======
Fehlerbehebung für häufige Probleme mit der PQ-Kryptographie-Infrastruktur.
----
===== Schnell-Diagnose =====
Führen Sie diese Befehle aus, um den Systemstatus zu prüfen:
# 1. OpenSSL Version
openssl version
# Erwartet: OpenSSL 3.6.0 oder höher
# 2. PQ-Algorithmen verfügbar?
openssl list -signature-algorithms | grep -i "ml-dsa"
openssl list -kem-algorithms | grep -i "ml-kem"
# 3. Provider aktiv?
openssl list -providers
# 4. .NET Runtime
dotnet --list-runtimes | grep "NETCore.App 8"
----
===== OpenSSL-Fehler =====
==== libcrypto nicht gefunden ====
**Symptom:**
Unable to load DLL 'libcrypto-3-x64.dll'
**Diagnose:**
# Windows - DLL suchen
where libcrypto-3-x64.dll
# Linux - Shared Library suchen
ldconfig -p | grep libcrypto
# macOS - Dylib suchen
ls /usr/local/lib/libcrypto*
**Lösung Windows (PowerShell als Administrator):**
# PATH prüfen
$env:PATH -split ";" | Select-String "OpenSSL"
# PATH erweitern (falls nicht vorhanden)
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\OpenSSL\bin", "Machine")
# Oder OPENSSL_PATH setzen
[Environment]::SetEnvironmentVariable("OPENSSL_PATH", "C:\Program Files\OpenSSL\bin", "Machine")
**Lösung Linux:**
# ldconfig aktualisieren
echo "/usr/local/openssl/lib64" | sudo tee /etc/ld.so.conf.d/openssl.conf
sudo ldconfig
# Verifizieren
ldconfig -p | grep libcrypto
----
==== OpenSSL-Version zu alt ====
**Symptom:**
OpenSSL version 3.6.0+ required for ML-DSA
**Diagnose:**
# Vollständige Version und Build-Info
openssl version -a
# Installierte Versionen finden (Linux)
find /usr -name "openssl" -type f 2>/dev/null
# Installierte Versionen finden (Windows)
where /r C:\ openssl.exe 2>nul
**Lösung:**
Aktualisieren Sie auf OpenSSL 3.6.0+ → [[.:installation|Installation]]
----
==== PQ-Algorithmen nicht verfügbar ====
**Symptom:**
openssl list -signature-algorithms | grep -i "ml-dsa"
# Keine Ausgabe
**Diagnose:**
# Provider-Status prüfen
openssl list -providers
# Alle verfügbaren Signatur-Algorithmen
openssl list -signature-algorithms
# Alle verfügbaren KEM-Algorithmen
openssl list -kem-algorithms
**Mögliche Ursachen:**
* OpenSSL < 3.6.0 (ML-DSA/ML-KEM erst ab 3.6)
* Provider nicht geladen
* Custom-Build ohne PQ-Support
----
===== Zertifikatsfehler =====
==== Zertifikat-Details anzeigen ====
# Zertifikat im PEM-Format analysieren
openssl x509 -in cert.pem -text -noout
# Signatur-Algorithmus prüfen
openssl x509 -in cert.pem -text -noout | grep "Signature Algorithm"
# Bei PQ-Zertifikaten erwartet:
# Signature Algorithm: ML-DSA-65 oder ML-DSA-87
# Public Key Details
openssl x509 -in cert.pem -pubkey -noout | openssl pkey -pubin -text -noout
==== Zertifikatkette verifizieren ====
# Einfache Verifikation
openssl verify -CAfile root-ca.crt -untrusted intermediate.crt server.crt
# Verbose mit Fehlerdetails
openssl verify -verbose -CAfile root-ca.crt -untrusted intermediate.crt server.crt
# Erwartete Ausgabe bei Erfolg:
# server.crt: OK
**Häufige Verifikationsfehler:**
^ Fehler ^ Bedeutung ^ Lösung ^
| ''unable to get local issuer certificate'' | CA-Zertifikat fehlt | Root/Intermediate CA hinzufügen |
| ''certificate has expired'' | Zertifikat abgelaufen | Zertifikat erneuern |
| ''certificate signature failure'' | Signatur ungültig | Zertifikat beschädigt/manipuliert |
| ''self signed certificate in chain'' | Self-signed nicht vertraut | Root CA zum Trust Store hinzufügen |
----
===== Schlüsselspeicher-Fehler =====
==== PQ-Schlüssel nicht gefunden ====
**Symptom:**
PQ private key not found for certificate thumbprint: ABC123...
**Diagnose:**
**Windows (PowerShell):**
# PQ-Schlüsselspeicher-Pfad
$pqKeyStore = "$env:LOCALAPPDATA\WvdS.Crypto\PqKeys"
# Existenz prüfen
Test-Path $pqKeyStore
# Inhalt auflisten
Get-ChildItem $pqKeyStore -ErrorAction SilentlyContinue
# Berechtigungen prüfen
Get-Acl $pqKeyStore | Format-List
**Linux:**
# PQ-Schlüsselspeicher-Pfad
PQ_KEYSTORE=~/.local/share/wvds-crypto/pqkeys
# Existenz prüfen
ls -la $PQ_KEYSTORE
# Berechtigungen prüfen (sollte 700 sein)
stat $PQ_KEYSTORE
**Lösung:**
- Backup wiederherstellen
- Falls kein Backup: Zertifikat mit neuem Schlüsselpaar neu erstellen
----
===== FIPS-Modus Fehler =====
==== FIPS Provider nicht aktiv ====
**Diagnose:**
# Provider auflisten
openssl list -providers
# Sollte enthalten:
# fips
# name: OpenSSL FIPS Provider
# status: active
**Lösung:**
FIPS Provider in ''openssl.cnf'' aktivieren → [[.:konfiguration#fips-modus_openssl|FIPS Konfiguration]]
----
==== Algorithmus nicht FIPS-konform ====
**Symptom:**
error:0308010C:digital envelope routines::unsupported
**Ursache:** Algorithmus nicht im FIPS-Modus erlaubt.
**FIPS 140-3 zugelassene Algorithmen:**
^ Typ ^ Zugelassen ^ Nicht zugelassen ^
| Signatur | ML-DSA-44/65/87, RSA ≥2048, ECDSA | Ed25519, Ed448 |
| KEM | ML-KEM-512/768/1024 | X25519, X448 |
| Hash | SHA-256, SHA-384, SHA-512 | MD5, SHA-1 |
| Cipher | AES-GCM | ChaCha20 |
----
===== Netzwerk-Diagnose =====
==== TLS-Verbindung testen ====
# TLS-Handshake und Zertifikat prüfen
openssl s_client -connect server.example.com:443 -showcerts
# Mit spezifischem CA-Bundle
openssl s_client -connect server.example.com:443 -CAfile /path/to/ca-bundle.crt
# TLS 1.3 erzwingen
openssl s_client -connect server.example.com:443 -tls1_3
==== Zertifikat von Server abrufen ====
# Zertifikat herunterladen und speichern
openssl s_client -connect server.example.com:443 < /dev/null 2>/dev/null | \
openssl x509 -outform PEM > server.crt
# Zertifikat analysieren
openssl x509 -in server.crt -text -noout
----
===== Log-Analyse =====
==== OpenSSL Fehler-Codes ====
# Fehlercode nachschlagen
openssl errstr 0308010C
# Alle kürzlichen Fehler anzeigen (falls im Debug-Modus)
openssl errstr
==== Windows Event Log prüfen ====
# Kryptographie-bezogene Events
Get-EventLog -LogName Application -Source "*Crypto*" -Newest 20
# .NET Runtime Fehler
Get-EventLog -LogName Application -Source ".NET Runtime" -Newest 10 -EntryType Error
==== Linux Syslog prüfen ====
# OpenSSL-bezogene Einträge
journalctl | grep -i openssl | tail -20
# .NET Runtime Fehler
journalctl | grep -i dotnet | tail -20
----
===== Weiterführend =====
* [[.:installation|Installation]] – Korrekte Einrichtung
* [[.:konfiguration|Konfiguration]] – FIPS-Modus, Pfade
* [[.:betrieb|Betrieb]] – Health Checks, Zertifikate
----
//Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional//
{{tag>troubleshooting fehler diagnose openssl}}