### Step 3: Build Public Objects

The public objects required by the ds_add_entry( ), ds_list( ), and ds_remove_entry( ) operations are defined in the following code fragment:

/* Build up descriptor lists for the following distinguished names: */

/* C=ie/O=sni */

/* C=ie/O=sni/OU=ap/CN=brendan */

/* C=ie/O=sni/OU=ap/CN=sinead */

static OM_descriptor ava_ie[] = {

OM_OID_DESC(OM_CLASS, DS_C_AVA),

OM_OID_DESC(DS_ATTRIBUTE_TYPE, DS_A_COUNTRY_NAME),

{DS_ATTRIBUTE_VALUES, OM_S_PRINTABLE_STRING, OM_STRING("ie")},

OM_NULL_DESCRIPTOR

};

static OM_descriptor ava_sni[] = {

OM_OID_DESC(OM_CLASS, DS_C_AVA),

OM_OID_DESC(DS_ATTRIBUTE_TYPE, DS_A_ORG_NAME),

{DS_ATTRIBUTE_VALUES, OM_S_TELETEX_STRING, OM_STRING("sni")},

OM_NULL_DESCRIPTOR

};

static OM_descriptor ava_ap[] = {

OM_OID_DESC(OM_CLASS, DS_C_AVA),

OM_OID_DESC(DS_ATTRIBUTE_TYPE, DS_A_ORG_UNIT_NAME),

{DS_ATTRIBUTE_VALUES, OM_S_TELETEX_STRING, OM_STRING("ap")},

OM_NULL_DESCRIPTOR

};

static OM_descriptor ava_brendan[] = {

OM_OID_DESC(OM_CLASS, DS_C_AVA),

OM_OID_DESC(DS_ATTRIBUTE_TYPE, DS_A_COMMON_NAME),

{DS_ATTRIBUTE_VALUES, OM_S_TELETEX_STRING, OM_STRING("brendan")},

OM_NULL_DESCRIPTOR

};

static OM_descriptor ava_sinead[] = {

OM_OID_DESC(OM_CLASS, DS_C_AVA),

OM_OID_DESC(DS_ATTRIBUTE_TYPE, DS_A_COMMON_NAME),

{DS_ATTRIBUTE_VALUES, OM_S_TELETEX_STRING, OM_STRING("sinead")},

OM_NULL_DESCRIPTOR

};

static OM_descriptor rdn_ie[] = {

OM_OID_DESC(OM_CLASS, DS_C_DS_RDN),

{DS_AVAS, OM_S_OBJECT, {0, ava_ie}},

OM_NULL_DESCRIPTOR

};

static OM_descriptor rdn_sni[] = {

OM_OID_DESC(OM_CLASS, DS_C_DS_RDN),

{DS_AVAS, OM_S_OBJECT, {0, ava_sni}},

OM_NULL_DESCRIPTOR

};

static OM_descriptor rdn_ap[] = {

OM_OID_DESC(OM_CLASS, DS_C_DS_RDN),

{DS_AVAS, OM_S_OBJECT, {0, ava_ap}},

OM_NULL_DESCRIPTOR

};

static OM_descriptor rdn_brendan[] = {

OM_OID_DESC(OM_CLASS, DS_C_DS_RDN),

{DS_AVAS, OM_S_OBJECT, {0, ava_brendan}},

OM_NULL_DESCRIPTOR

};

static OM_descriptor rdn_sinead[] = {

OM_OID_DESC(OM_CLASS, DS_C_DS_RDN),

{DS_AVAS, OM_S_OBJECT, {0, ava_sinead}},

OM_NULL_DESCRIPTOR

};

static OM_descriptor dn_ap[] = {

OM_OID_DESC(OM_CLASS,DS_C_DS_DN),

{DS_RDNS,OM_S_OBJECT,{0,rdn_ie}},

{DS_RDNS,OM_S_OBJECT,{0,rdn_sni}},

{DS_RDNS,OM_S_OBJECT,{0,rdn_ap}},

OM_NULL_DESCRIPTOR

};

static OM_descriptor dn_brendan[] = {

OM_OID_DESC(OM_CLASS,DS_C_DS_DN),

{DS_RDNS,OM_S_OBJECT,{0,rdn_ie}},

{DS_RDNS,OM_S_OBJECT,{0,rdn_sni}},

{DS_RDNS,OM_S_OBJECT,{0,rdn_ap}},

{DS_RDNS,OM_S_OBJECT,{0,rdn_brendan}},

OM_NULL_DESCRIPTOR

};

static OM_descriptor dn_sinead[] = {

OM_OID_DESC(OM_CLASS,DS_C_DS_DN),

{DS_RDNS,OM_S_OBJECT,{0,rdn_ie}},

{DS_RDNS,OM_S_OBJECT,{0,rdn_sni}},

{DS_RDNS,OM_S_OBJECT,{0,rdn_ap}},

{DS_RDNS,OM_S_OBJECT,{0,rdn_sinead}},

OM_NULL_DESCRIPTOR

};

###