Inhaltsverzeichnis

CryptoConfig.OpenSslPath Property

Gets or sets the path to the OpenSSL library.


Definition

namespace WvdS.System.Security.Cryptography
 
public static string? OpenSslPath { get; set; }

Property Value

Type string?
Default Value null (automatic search)

Remarks

When null, the library automatically searches for OpenSSL:

Platform Search Paths
Windows x64 libcrypto-3-x64.dll in application directory, PATH
Linux libcrypto.so.3 in LD_LIBRARY_PATH, /usr/lib
macOS libcrypto.3.dylib in DYLD_LIBRARY_PATH, /opt/homebrew/lib

Requirements

OpenSSL 3.6.0 or higher is required for ML-DSA and ML-KEM support.


Examples

Windows

CryptoConfig.OpenSslPath = @"C:\OpenSSL-3.6\bin\libcrypto-3-x64.dll";

Linux

CryptoConfig.OpenSslPath = "/opt/openssl-3.6/lib64/libcrypto.so.3";

macOS

CryptoConfig.OpenSslPath = "/opt/homebrew/opt/openssl@3/lib/libcrypto.3.dylib";

Exceptions

DllNotFoundException OpenSSL library not found or cannot be loaded
InvalidOperationException OpenSSL version < 3.6

See Also


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