X509CertificateInitiatorServiceCredential.Certificate 属性

定义

获取或设置要在 MutualCertificateDuplex 消息安全身份验证模式中使用的证书。

public:
 property System::Security::Cryptography::X509Certificates::X509Certificate2 ^ Certificate { System::Security::Cryptography::X509Certificates::X509Certificate2 ^ get(); void set(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ value); };
public System.Security.Cryptography.X509Certificates.X509Certificate2 Certificate { get; set; }
member this.Certificate : System.Security.Cryptography.X509Certificates.X509Certificate2 with get, set
Public Property Certificate As X509Certificate2

属性值

X509Certificate2

如果使用 X509Certificate2 消息安全身份验证模式,则用于加密消息的 MutualCertificateDuplex 将由不相关的双向传输事例中的服务发送给客户端。

例外

试图设置只读凭据。

示例

下面的代码演示如何使用此属性获取证书。

注解

当使用 MutualCertificateDuplex 消息安全身份验证模式时,此属性用于配置为消息安全模式的绑定。

适用于