X509CertificateInitiatorServiceCredential.Certificate 属性
定义
获取或设置要在 MutualCertificateDuplex 消息安全身份验证模式中使用的证书。Gets or sets the certificate to use in MutualCertificateDuplex message security authentication mode.
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 消息安全身份验证模式,则用于加密消息的 MutualCertificateDuplex 将由不相关的双向传输事例中的服务发送给客户端。The X509Certificate2 to use to encrypt messages sent to the client by the service in the uncorrelated duplex transport case if the MutualCertificateDuplex message security authentication mode is used.
例外
试图设置只读凭据。An attempt was made to set a read-only credential.
示例
下面的代码演示如何使用此属性获取证书。The following code shows how to use this property to get the certificate.
注解
当使用 MutualCertificateDuplex 消息安全身份验证模式时,此属性用于配置为消息安全模式的绑定。This property is used for bindings that are configured to message security mode when MutualCertificateDuplex message security authentication mode is used.