Share via


ECDsaCertificateExtensions.CopyWithPrivateKey(X509Certificate2, ECDsa) Yöntem

Tanım

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

Parametreler

certificate
X509Certificate2

ECDSA sertifikası.

privateKey
ECDsa

Özel ECDSA anahtarı.

Döndürülenler

özelliği olarak ayarlanmış trueyeni bir ECDSA sertifikasıHasPrivateKey. Giriş ECDSA 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