SchannelCredentials.loadCertAndKeyFromPfx

CERT_CONTEXT * loadCertAndKeyFromPfx(string path) @trusted nothrow

Load a certificate with its private key from a PFX (PKCS#12) file.

Imports the PFX into a memory certificate store using PFXImportCertStore with PKCS12_NO_PERSIST_KEY to avoid persisting keys to disk. The cert context returned from this store has an associated private key, enabling SChannel to perform server-side TLS handshakes.

Parameters

pathPath to the PFX file.

Returns

Certificate context with private key, or null on failure.