Discuss this help topic in SecureBlackbox Forum

XML: Set signing certificate

The SigningCertificate element contains the sequence of certificate identifiers and digests computed on the certificates. To add signing certificates you need to put those certificates into a newly created or existing certificate storage, then assign this certificate storage to TElXAdESSigner.SigningCertificates property. Additionally you can set TElXAdESSigner.SigningCertificatesDigestMethod property, which controls the algorithm to use for the digest on provided certificates (default is SHA1 digest method).

C#:


XAdESSigner.SigningCertificates = new TElMemoryCertStorage(null);
XAdESSigner.OwnSigningCertificates = true;
XAdESSigner.SigningCertificates.Add(Certificate);
XAdESSigner.SigningCertificatesDigestMethod = SBXMLSec.__Global.xdmSHA256;
Delphi:

XAdESSigner.SigningCertificates := TElMemoryCertStorage.Create(nil);
XAdESSigner.OwnSigningCertificates := true;
XAdESSigner.SigningCertificates.Add(Certificate);
XAdESSigner.SigningCertificatesDigestMethod := xdmSHA256;

How To articles about XML signing (XMLDSig and XAdES)

Discuss this help topic in SecureBlackbox Forum