Share via


DSACertificateExtensions.CopyWithPrivateKey(X509Certificate2, DSA) Yöntem

Tanım

Yeni bir DSA sertifikası oluşturmak için özel anahtarı sertifikanın DSA 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::DSA ^ privateKey);
public static System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey (this System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.Security.Cryptography.DSA privateKey);
static member CopyWithPrivateKey : System.Security.Cryptography.X509Certificates.X509Certificate2 * System.Security.Cryptography.DSA -> System.Security.Cryptography.X509Certificates.X509Certificate2
<Extension()>
Public Function CopyWithPrivateKey (certificate As X509Certificate2, privateKey As DSA) As X509Certificate2

Parametreler

certificate
X509Certificate2

DSA sertifikası.

privateKey
DSA

Özel DSA anahtarı.

Döndürülenler

özelliği olarak trueayarlanmış yeni bir DSA sertifikasıHasPrivateKey. Giriş DSA 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