DSACertificateExtensions.CopyWithPrivateKey(X509Certificate2, DSA) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将私钥与 DSA 证书的公钥合并,以生成新的 DSA 证书。
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
参数
- certificate
- X509Certificate2
DSA 证书。
- privateKey
- DSA
私有 DSA 密钥。
返回
新 DSA 证书,其 HasPrivateKey 属性设置为 true
。 未修改输入 DSA 证书对象。
例外
certificate
或 privateKey
为 null
。
该证书已有关联的私钥。