Share via


RSACertificateExtensions.CopyWithPrivateKey(X509Certificate2, RSA) Yöntem

Tanım

Yeni bir RSA sertifikası oluşturmak için özel anahtarı sertifikanın RSA ortak anahtarıyla birleştirir.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Security::Cryptography::X509Certificates::X509Certificate2 ^ CopyWithPrivateKey(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate, System::Security::Cryptography::RSA ^ privateKey);
public static System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey (this System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.RSA privateKey);
static member CopyWithPrivateKey : System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.RSA -> System.Security.Cryptography.X509Certificates.X509Certificate2
<Extension()>
Public Function CopyWithPrivateKey (certificate As X509Certificate2, privateKey As RSA) As X509Certificate2

Parametreler

certificate
X509Certificate2

RSA sertifikası.

privateKey
RSA

Özel RSA anahtarı.

Döndürülenler

özelliği olarak trueayarlanmış yeni bir RSA sertifikasıHasPrivateKey. Giriş RSA sertifika nesnesi değiştirilmez.

Özel durumlar

certificate veya privateKey şeklindedir null.

Sertifikanın zaten ilişkili bir özel anahtarı var.

Sertifikanın ortak anahtarı yok.

-veya-

Belirtilen özel anahtar, belirtilen sertifikanın ortak anahtarıyla eşleşmiyor.

Şunlara uygulanır