Signature.Certificate 属性

定义

CertificateObject获取 X.509 数字证书的对象,该证书用于对表单或表单中的一组签名数据进行签名。

public:
 property Microsoft::Office::Interop::InfoPath::SemiTrust::CertificateObject ^ Certificate { Microsoft::Office::Interop::InfoPath::SemiTrust::CertificateObject ^ get(); };
public Microsoft.Office.Interop.InfoPath.SemiTrust.CertificateObject Certificate { get; }
member this.Certificate : Microsoft.Office.Interop.InfoPath.SemiTrust.CertificateObject
Public ReadOnly Property Certificate As CertificateObject

属性值

示例

在以下示例中,对象的 Certificate 属性 SignatureObject 用于访问数字签名的证书,并在消息框中显示 IssuedTo 对象的 CertificateObject 属性:

public void DisplaySignatureProperties()
{
SignatureObject mySignature = thisXDocument.SignedDataBlocks[0].Signatures[0];
CertificateObject signatureCertificate = mySignature.<span class="label">Certificate</span>;
thisXDocument.UI.Alert("Certificate Issued To = " + signatureCertificate.IssuedTo);
}

注解

重要提示:此成员只能由与当前打开的窗体在同一域中运行的表单访问,或者由已授予跨域权限的表单访问。

适用于