====== 3. Build ======
Here you'll learn how to compile OpenSSL for different platforms.
----
===== Which Build Do I Need? =====
^ Target ^ Platform ^ Guide ^
| .NET on Windows | Windows x64 | [[.:windows-x64|Windows x64 Build]] |
| FIPS 140-3 Compliance | Windows x64 | [[.:windows-fips|FIPS Build]] |
| Blazor WebAssembly | WASM | [[.:wasm-blazor|WASM/Blazor Build]] |
| Docker/Container | Linux | [[.:linux-wsl|Linux Build (WSL)]] |
----
===== Decision Help =====
**Not sure?** Start with the [[.:windows-x64|Windows x64 Build]] - it covers most use cases.
**Do I need FIPS?**
* Government agencies → **Yes**
* Banks / Financial sector → **Yes**
* Healthcare → **Often yes**
* Internal corporate apps → **Usually no**
**Do I need WASM?**
* Blazor WebAssembly App → **Yes**
* Blazor Server App → **No** (uses Windows build)
* Server-side application → **No**
----
===== Build Overview =====
==== Windows x64 (Standard) ====
The most common build for .NET applications:
perl Configure VC-WIN64A --prefix=D:\Projects\openssl-3.6.0\bin
nmake
nmake install_sw
**Result:**
* ''libcrypto-3-x64.dll'' - Cryptography library
* ''libssl-3-x64.dll'' - TLS library
* ''openssl.exe'' - Command line tool
→ [[.:windows-x64|Complete Guide]]
==== Windows x64 FIPS ====
For FIPS 140-3 compliance:
perl Configure VC-WIN64A enable-fips --prefix=D:\Projects\openssl-3.6.0\bin
nmake
nmake install_sw install_fips
**Additional result:**
* ''fips.dll'' - FIPS Provider Module
* ''fipsmodule.cnf'' - FIPS Configuration
→ [[.:windows-fips|Complete Guide]]
==== WASM for Blazor ====
For Blazor WebAssembly:
# In WSL with Emscripten
emconfigure ./Configure linux-generic32 no-asm no-threads no-shared
emmake make
**Result:**
* ''openssl.js'' - JavaScript wrapper
* ''openssl.wasm'' - WebAssembly module
→ [[.:wasm-blazor|Complete Guide]]
==== Linux (in WSL) ====
For Docker containers or Linux servers:
./Configure linux-x86_64 --prefix=/opt/openssl
make -j$(nproc)
make install
**Result:**
* ''libcrypto.so.3'' - Shared library
* ''libssl.so.3'' - TLS library
→ [[.:linux-wsl|Complete Guide]]
----
===== Build Options =====
The most important ''Configure'' options:
^ Option ^ Description ^
| ''VC-WIN64A'' | Target: Visual C++, Windows 64-bit |
| ''linux-x86_64'' | Target: Linux 64-bit |
| ''--prefix='' | Installation directory |
| ''--openssldir='' | Configuration directory |
| ''no-asm'' | No assembly (slower, but without NASM) |
| ''no-shared'' | Static libraries only |
| ''enable-fips'' | Enable FIPS provider |
| ''no-threads'' | No thread support (for WASM) |
----
===== Build Duration =====
^ Platform ^ Hardware ^ Duration ^
| Windows x64 | i7, 16GB RAM | 10-15 min |
| Windows x64 | i5, 8GB RAM | 20-30 min |
| WASM | Any | 5-10 min |
| Linux | 4 cores | 5-10 min |
----
===== Continue to =====
* [[.:windows-x64|Windows x64 Build - Step by Step]]
* [[.:testen:start|4. Testing - Verify Installation]]
----
//Wolfgang van der Stille @ EMSR DATA d.o.o. - Post-Quantum Cryptography Professional//