EldoS | Feel safer!

Software components for data protection, secure storage and transfer

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

There is a global variable RDNDescriptorMap in SBXMLSec unit/namespace that controls the order.

For example the original order is:
<ds:X509IssuerName>C=EU, O=EldoS, OU=EldoS 1 EU</ds:X509IssuerName>

But we want to get the same order that .Net framework generates:
<ds:X509IssuerName>OU=EldoS 1 EU, O=EldoS, C=EU</ds:X509IssuerName>

To do this we should add a following line:
C# code:
SBXMLSec.Unit.RDNDescriptorMap.CompatibilityMode =
  SBXMLSec.TElXMLRDNCompatibilityMode.DotNET; // default value is TElXMLRDNCompatibilityMode.RFC

Delphi code:
SBXMLSec. RDNDescriptorMap.CompatibilityMode = cmDotNET; // default value is cmRFC

To change descriptor name from “E” to “EMAIL”, use the following code:
RDNDescriptorMap.Add(SB_CERT_OID_EMAIL, "E"); // second value works as an alias for parsing

Return to the list


Back to top

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

Got it!