set_PrivateKey()

X509Certificate2::set_PrivateKey(const SharedPtr<AsymmetricAlgorithm>&) method

Sets or clears private key associated with certificate.

void System::Security::Cryptography::X509Certificates::X509Certificate2::set_PrivateKey(const SharedPtr<AsymmetricAlgorithm> &value)

Arguments

ParameterTypeDescription
valueconst SharedPtr<AsymmetricAlgorithm>&Private key object (or nullptr to unset).

See Also