CryptoSys PKI Pro Manual

Entering values that include the semi-colon and equals sign

To write a value in a distinguished name that includes the semicolon (';' U+003B) or equals sign ('=' U+003D), enclose the string in single quotes (apostrophe "'" U+0027) and use the backslash ('\' U+005C) to escape the special characters ";", "=", "'" and "\".

InputOutput
\;;
\==
\'' (single quote)
\\\ (backslash)

As an extreme example, to form a DN with organizationalUnit value

This=\E'asy;

i.e. the 12-byte string beginning with "T" and ending with ";" (0x)54 68 69 73 3D 5C 45 27 61 73 79 3B

Specify this in the DN string as OU='This\=\\E\'asy\;'.

In VB,

strDN = "CN=My User;O=Test Org;OU='This\=\\E\'asy\;';C=AU"

In C, you need to double-escape the backslash character:

strDN = "CN=My User;O=Test Org;OU='This\\=\\\\E\\'asy\\;';C=AU";

In C#, use a verbatim string literal:

strDN = @"CN=My User;O=Test Org;OU='This\=\\E\'asy\;';C=AU";
[PREV: UTF-8 encoding in distinguished names...]   [Contents]   [Index]   
   [NEXT: Specifying an arbitrary RDN in a distinguished name...]

Copyright © 2004-18 D.I. Management Services Pty Ltd. All rights reserved.