000026126 - Add user-defined attribute type UID for use in Cert-C NAME_OBJ and ATTRIBUTES_OBJ.

Document created by RSA Customer Support Employee on Jun 14, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000026126
Applies ToThe OID for UID is 0.9.2342.19200300.100.1.1.
RSA BSAFE Cert-C
The sample code contains an example of an attribute type not supported in the toolkit. The telephone number attribute is not supported in Cert-C by default. See the sample code for the way AT_TELEPHONE_NUMBER is handled.
We need the BER-encoded representation of the UID OID. The RSA Labs web site has a document called, "A Layman's Guide to a subset of ASN.1, BER, and DER".  Section 5.9 has the formula and a few examples.  See http://www.rsasecurity.com/rsalabs/pkcs.
To convert the OID 0.9.2342.19200300.100.1.1 to hexadecimal form (following the formula in the document mentioned previously):

40 * 0 + 9 = 0x09
2342 = 18 * 128^1 + 38 * 128^0 = 0x12 0x26 => 0x92 0x26
19200300 = 9 * 128^3 + 19 * 128^2 + 114 * 128^1 + 44 * 128^0
 = 0x09 0x13 0x72 0x2c => 0x89 0x93 0xf2 0x2c
100 = 100 * 128^0 = 0x64 => 0x64
1 = 1 * 128^0 = 0x01 => 0x01
1 => 0x01

Therefore, 0.9.2342.19200300.100.1.1 translates to {0x09, 0x92, 0x26, 0x89, 0x93, 0xf2, 0x2c, 0x64, 0x01, 0x01}
IssueAdd user-defined attribute type UID for use in Cert-C NAME_OBJ and ATTRIBUTES_OBJ.
ResolutionAdd the following to your code, and AT_UID and AT_UID_LEN can be used  like any of the other AT_* and AT_*_LEN identifiers in the toolkit:

#define AT_UID_LEN 10

unsigned char AT_UID[AT_UID_LEN] = {
 0x09, 0x92, 0x26, 0x89, 0x93, 0xf2, 0x2c, 0x64,
 0x01, 0x01
};
Legacy Article IDa536

Attachments

    Outcomes