Inhaltsverzeichnis

Troubleshooting

Hier finden Sie Lösungen für häufige Probleme beim OpenSSL Build.


Build-Fehler

"stdlib.h not found" oder "windows.h not found"

Symptom:

fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory

Ursache: Windows SDK nicht installiert oder nicht im Pfad.

Lösung:

# Option 1: Windows SDK installieren
winget install Microsoft.WindowsSDK.10.0.22621
 
# Option 2: In Visual Studio Installer
# → "Einzelne Komponenten" → "Windows 10 SDK" auswählen

Dann: Visual Studio Umgebung neu laden:

call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"

"perl is not recognized"

Symptom:

'perl' is not recognized as an internal or external command

Ursache: Perl nicht installiert oder nicht im PATH.

Lösung:

# Perl installieren
winget install StrawberryPerl.StrawberryPerl
 
# PATH manuell setzen (falls nach Neustart immer noch nicht gefunden)
set PATH=C:\Strawberry\perl\bin;%PATH%

"NASM not found"

Symptom:

NASM not found - please read INSTALL.md

Ursache: NASM nicht installiert oder nicht im PATH.

Lösung A: NASM installieren (empfohlen)

winget install NASM.NASM
 
# PATH setzen (Pfad kann variieren!)
set PATH=%LOCALAPPDATA%\bin\NASM;%PATH%
 
# Prüfen
nasm -v

Lösung B: Ohne NASM bauen (langsamer)

perl Configure VC-WIN64A no-asm --prefix=D:\Projects\openssl-3.6.0\bin

Ohne NASM sind AES und SHA deutlich langsamer!


"cl.exe not found"

Symptom:

'cl' is not recognized as an internal or external command

Ursache: Visual Studio Umgebung nicht geladen.

Lösung:

call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"

Tipp: Starten Sie immer mit der „Developer Command Prompt for VS 2022“ aus dem Startmenü - dort ist die Umgebung bereits geladen.


"nmake hängt bei 'nmake clean'"

Symptom: nmake clean antwortet nicht oder bricht mit Fehler ab.

Ursache: Bekanntes Problem bei vorherigen fehlgeschlagenen Builds.

Lösung:

# Makefile manuell löschen
del makefile
 
# Neu konfigurieren
perl Configure VC-WIN64A --prefix=D:\Projects\openssl-3.6.0\bin
 
# Neu bauen
nmake

"LNK1181: cannot open input file '*.obj'"

Symptom:

LINK : fatal error LNK1181: cannot open input file 'crypto\aes\aes-x86_64.obj'

Ursache: Vorheriger Build fehlgeschlagen, Objektdateien fehlen.

Lösung:

# Alles löschen und neu starten
del makefile
nmake clean 2>nul
perl Configure VC-WIN64A --prefix=D:\Projects\openssl-3.6.0\bin
nmake

PowerShell-Probleme

"cl.exe verursacht Fehler trotz Erfolg"

Symptom: PowerShell-Skript bricht ab, obwohl cl.exe funktioniert.

Ursache: cl.exe schreibt Versionsinformationen nach stderr, was bei $ErrorActionPreference = „Stop“ als Fehler interpretiert wird.

Lösung im Skript:

# cl.exe Ausgabe richtig behandeln
try {
    $clOutput = & cl 2>&1 | Out-String
    Write-Host "cl.exe gefunden"
} catch {
    Write-Host "cl.exe gefunden (stderr ignoriert)"
}

"Execution Policy verhindert Skript"

Symptom:

File D:\...\build_openssl.ps1 cannot be loaded because running scripts is disabled

Lösung:

# Option 1: Für diese Session erlauben
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
 
# Option 2: Beim Aufruf umgehen
powershell.exe -ExecutionPolicy Bypass -File "build_openssl.ps1"

Laufzeit-Probleme

"DLL not found" bei Programmstart

Symptom:

The program can't start because libcrypto-3-x64.dll is missing

Lösung:

1. DLLs in den Anwendungsordner kopieren:

copy D:\Projects\openssl-3.6.0\bin\bin\libcrypto-3-x64.dll .\
copy D:\Projects\openssl-3.6.0\bin\bin\libssl-3-x64.dll .\

2. Oder in .csproj automatisch kopieren:

<ItemGroup>
  <None Update="libcrypto-3-x64.dll">
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  </None>
  <None Update="libssl-3-x64.dll">
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  </None>
</ItemGroup>

"ML-DSA/ML-KEM nicht verfügbar"

Symptom:

openssl list -signature-algorithms | findstr mldsa
# Keine Ausgabe

Mögliche Ursachen:

1. Falsche OpenSSL-Version - Benötigt 3.6.0 oder neuer

openssl version
# Muss sein: OpenSSL 3.6.0 oder höher

2. Provider nicht geladen

openssl list -providers
# Sollte "default" und eventuell "oqsprovider" zeigen

"FIPS provider not available"

Symptom:

openssl list -providers
# Zeigt kein "fips"

Lösung:

1. Wurde mit enable-fips gebaut?

perl Configure VC-WIN64A enable-fips --prefix=...
nmake
nmake install_sw install_fips

2. Ist openssl.cnf korrekt konfiguriert?

# In openssl.cnf:
[openssl_init]
providers = provider_sect
 
[provider_sect]
fips = fips_sect
base = base_sect
 
[fips_sect]
activate = 1
 
[base_sect]
activate = 1

Netzwerk-Probleme

"Git clone schlägt fehl"

Symptom: Timeout oder Verbindungsfehler bei git clone.

Lösung für Unternehmens-Proxy:

# Proxy konfigurieren
git config --global http.proxy http://proxy.firma.de:8080
git config --global https.proxy http://proxy.firma.de:8080

Lösung für SSL-Zertifikatfehler:

# Temporär SSL-Prüfung deaktivieren (nur für Download!)
git config --global http.sslVerify false
 
# Nach Download wieder aktivieren
git config --global http.sslVerify true

Weitere Hilfe

Falls Ihr Problem hier nicht aufgeführt ist:


Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional