EldoS | Feel safer!

Software components for data protection, secure storage and transfer

X509IssuerName: fields order

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
Posted: 11/03/2010 07:10:19
by Jose Aznar (Standard support level)
Joined: 02/14/2008
Posts: 14

Hello everyone,

When signing an XMl document adding the signingcertificate to xadesproperties I get the X509IssuerName field like this:

<ds:X509IssuerName>C=FR, O=ETSI, OU=Plugtests STF-351 2008-2009, CN=LevelBCAOK</ds:X509IssuerName>

Is it possible to change the order of the elements inside the tag?

Thanks in advance,
Rafael Mozún

- <xades:SigningCertificate>
- <xades:Cert>
- <xades:CertDigest>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
- <xades:IssuerSerial>
<ds:X509IssuerName>C=FR, O=ETSI, OU=Plugtests STF-351 2008-2009, CN=LevelBCAOK</ds:X509IssuerName>
Posted: 11/03/2010 09:13:05
by Dmytro Bogatskyy (EldoS Corp.)

Do you want to reverse order of RDN components? Or format them in some specific order?

The formatting of RDN is controlled using RDNDescriptorMap global instance.
In VCL: SBXMLSec.RDNDescriptorMap
In .Net: SBXMLSec.Unit.RDNDescriptorMap

You can reverse order of RDN components using RDNDescriptorMap.ReverseOrder property (it is available from version 8.1.190, and set to true by default).
If you need to specify some specific order of RDN components, you can use SetOrder method, for example:
RDNDescriptorMap.SetOrder(0, SB_CERT_OID_EMAIL);
RDNDescriptorMap.SetOrder(1, SB_CERT_OID_COMMON_NAME);

If you need to map some specific OID descriptor to it string representation, you can:
Posted: 11/04/2010 05:39:14
by Jose Aznar (Standard support level)
Joined: 02/14/2008
Posts: 14


Setting the CompatibilityMode to .NET was enough for my requirements.

SBXMLSec.Unit.RDNDescriptorMap.CompatibilityMode =

Thanks for all!
Rafael Mozún



Topic viewed 2085 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!