Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodTstCustomCertificateManager.GetRSAPrivateKey

function GetRSAPrivateKey(const aIdentifier: OctetString): iIFPrivateKey; overload;
Locate the RSA (integer-factorization) private key that matches the public key found under aIdentifier. Used when the app must sign or decrypt with a locally held RSA key, e.g. serving a TLS server certificate or decrypting a CMS EnvelopedData bag. Returns nil if no matching private key is stored.
function GetRSAPrivateKey(const aCert: iCertificate): iIFPrivateKey; overload;
As above, but keyed directly by a certificate whose SPKI is an RSA public key; matches the private key against that certificate. Convenient when you already hold the iCertificate (e.g. inside ExportToPFXFile).