Discuss this help topic in SecureBlackbox Forum

SOAP: Add XAdES information to signature

To add XAdES information to the signature you need to create an instance of TElXAdESSigner class, setup its options, then assign it to TElXMLSOAPBaseSignatureHandler.XAdESProcessor property before signing.

The sample code below creates XAdES-BES form and sets SigningTime and SigningCertificates properties:

C#:


TElXAdESSigner XAdESSigner = new TElXAdESSigner(null);
Handler.XAdESProcessor = XAdESSigner;
Handler.OwnXAdESProcessor = true;

// set XAdES options, for example:
XAdESSigner.XAdESVersion = SBXMLAdES.__Global.XAdES_v1_3_2;
XAdESSigner.SigningTime = DateTime.UtcNow;
XAdESSigner.SigningCertificates = new TElMemoryCertStorage();
XAdESSigner.OwnSigningCertificates = true;
XAdESSigner.SigningCertificates.Add(Certificate);
...
XAdESSigner.Generate(SBXMLAdES.__Global.XAdES_BES);

Handler.Sign(...);

Delphi:

XAdESSigner := TElXAdESSigner.Create(nil);
Handler.XAdESProcessor := XAdESSigner;
Handler.OwnXAdESProcessor := true;
// set XAdES options, for example:
XAdESSigner.XAdESVersion := XAdES_v1_3_2;
XAdESSigner.SigningTime := UtcNow;
XAdESSigner.SigningCertificates := TElMemoryCertStorage.Create();
XAdESSigner.OwnSigningCertificates := true;
XAdESSigner.SigningCertificates.Add(Certificate);
...
XAdESSigner.Generate(XAdES_BES);

Handler.Sign(...);

How To articles about SOAP messages

Discuss this help topic in SecureBlackbox Forum