SecureBlackbox Knowledge Base

Recent XML Articles


How do I change the SigningTime element to show local time?

The SigningTime element shows the time in UTC by default; you can follow this KB to display the local time zone instead.

How I do modify the QualifyingProperties element (the main element in XAdES) like an Id and/or node prefix?

The procedure is as follows: Set XAdES interface properties like the following: PolicyId, ProductionPlace, SignerRole, Included, SigningCertificates, XAdESForm, …

How to fill the SigPolicyHash for XAdES

The digest value of the signature policy is calculated over the SigPolicyId \Identifier element. If the Identifier element contains a URI, then the hash is calcu…

How do I change the order of RDN elements or control their appearance in the X509IssuerName and/or X509SubjectName elements?

There is a global variable RDNDescriptorMap in the SBXMLSec unit/namespace that controls the order. For example if the original order is C=EU, O=EldoS, OU=EldoS …

How to reference elements inside the Signature element

Create an instance of the TElXMLReference class, but don't fill the URIData and URINode properties. Add it to the References after the call to UpdateReferencesDi…

Is there any way to put the prefix "ds" to XML-DSig nodes?

Is there any way to put the prefix "e;ds"e; to XML-DSig nodes?

How to modify 'EncryptedData' element properties such as Id and/or node prefix

How to modify 'EncryptedData' element properties such as Id and/or node prefix.

How do I modify 'Signature' element properties, e.g., <Id>?

How do I modify 'Signature' element properties, e.g., <Id>

What versions of XAdES are supported?

XAdES versions 1.1.1, 1.2.2, 1.3.2, and 1.4.1 (1.4.2) are supported. For XAdES (XAdES-BES, XAdES-EPES) and XAdES-T forms, there is a simple interface available v…

What versions of XAdES are supported?

XAdES versions 1.1.1, 1.2.2, 1.3.2, and 1.4.1 (1.4.2) are supported. For XAdES (XAdES-BES, XAdES-EPES) and XAdES-T forms, there is a simple interface available v…

When using the ValidateReferences method in TElXMLVerifier, I get the following error: Reference requires a context error.

This entry shows how to resolve the following error when using the ValidateReferences method in TElXMLVerifier: Reference requires a context error.

Resolving OutOfMemory Errors when loading large XML documents

This article explains shows the steps to resolve OutOfMemory errors when loading large XML documents.

Can I customize <KeyInfo> tag content?

Please use the IncludeKeyValue and IncludeDataParams properties of the TElXMLKeyInfoX509Data class.…

I have modified the signed data, but the VerifySignature method reports the signature as valid. Why is that?

I have modified the signed data, but VerifySignature method reports the signature as valid. Why is that?

How do I include certificates when creating an XML signature?

First of all, to include a signing key or certificate with the signature you need to set the TElXMLSigner.IncludeKey property to true (this is the default value)…

How do I use timestamping with PDFBlackbox, XMLBlackbox, or PKIBlackbox?

How to use timestamping with PDFBlackbox, XMLBlackbox, or PKIBlackbox.

How do I remove the ds: prefix when signing the data?

After the line ElXMLSigner.Sign()/GenerateSignature()/GenerateSignatureAsync(); (this method generates “Signature” structure that could be accessed using ElXMLSi…

How Do I Use Timestamping with PDFBlackbox, XMLBlackbox, or PKIBlackbox?

How to use timestamping with PDFBlackbox, XMLBlackbox, or PKIBlackbox.

How do I extract a key from the KeyInfo element?

To extract a key from the KeyInfo element, use the following code: C# notation for (int i = 0; i ElXMLVerifier.Signature.KeyInfo.Count; i++) if (ElXMLVerifier.Si…

Signing invoices for the Spanish government in the factura format

Sample code for signing electronic invoices for the Spanish government in the Factura XML format.