OpenSSL Integration in .NET - The Good and the Challenging
summary
.NET uses the system TLS libraries on Linux and the integration is a handmade dynamic loader that uses dlopen with function probing and a big macro list of required, optional and fallback polyfill headers so one binary can work with OpenSSL 1.1, 3.x and interim builds. The code handles renamed APIs, supplies missing functions, and even supports loading two OpenSSL versions in one process; a subtle ARM32 bug from 32 vs 64-bit flags and widespread malloc arena fragmentation from repeated CRL parsing are real failures found and partially mitigated.
AI-written summary · about
chapters (22)
- 0:00Introduction and speaker background
- 1:13.NET on Linux and OpenSSL
- 5:56SChannel vs OpenSSL differences
- 10:16Building .NET for Linux distributions
- 15:55Platform Access Layer and OpenSSL
- 16:36Loading OpenSSL dynamically
- 18:22Handling OpenSSL function pointers
- 20:10Required, fallback and legacy functions
- 23:06Legacy algorithm bridging
- 24:10Compiling against older headers
- 25:57Common integration issues
- 26:18ARM32 calling convention bug
- 29:11Fixing parameter passing issues
- 29:32Loading multiple OpenSSL versions
- 31:39QUIC protocol and OpenSSL fork
- 33:09Memory usage with large CRLs
- 35:57Memory fragmentation problem
- 37:00Async programming impact
- 39:27Maloc trim limitations
- 40:08Caching certificate revocation lists
- 40:50Q&A on .NET Framework support
- 42:41Supported Linux distributions
