Discuss this help topic in SecureBlackbox Forum

Use international characters in certificates

You should take extra care when generating certificates with fields that contain international characters. This is not only a matter of correct character encoding. You should provide the correct ASN.1 tag ID to the component to ensure that the fields are encoded properly.

Suppose you want the Locality field of your certificate's Subject to be localized to your state language which implies use of international characters (let's say, you want to set it to 'A Coruna'). In this case you need to explicitly use UTF8 encoding throughout:

SBStrUtils.Unit.StrToUTF8("A Coruna"), // encoding the string in UTF8
SBASN1Tree.Unit.SB_ASN1_UTF8STRING // specifying the relevant ASN.1 tag
The same applies to any other Subject or Issuer field.

If a particular entry does not contain international characters, it is safe to use SBASN1Tree.Unit.SB_ASN1_PRINTABLESTRING tag for it. However, SBASN1Tree.Unit.SB_ASN1_UTF8STRING will also work.

Certificate-related How To articles

Discuss this help topic in SecureBlackbox Forum