CryptoSys PKI Toolkit Manual

Entering values that include the semi-colon and equals sign

[New in v3.3] If you really need to add a value in your distinguished name that includes the semi-colon or equals sign, then you can quote the value using the apostrophe character ('). The rules are similar to those for quoting and escaping strings in RFC822. Say, for whatever reasons, you need to form a DN with organizationalUnit value

This=\Easy;

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

Specify this in the DN string as OU='This\=\\Easy\;'. Surround the value with apostrophes (') and escape the "=" and ";" characters with a backslash "\". To include a backslash in a quoted value, use "\\".

In VB,

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

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

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

[Contents] [Index]

[HOME]   [NEXT: X.509 Extensions Parameter...]

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