![]() |
TrustCore SDK NanoCrypto API reference
version 7.0
|
Container for nameAttr structure information required to construct an ASN.1 RelativeDistinguishedName object.
More...
Data Fields | |
| ubyte4 | nameAttrCount |
Number of nameAttr objects in pNameAttr. More... | |
| nameAttr * | pNameAttr |
Array of nameAttr of length dnCount. More... | |
This structure is a container for nameAttr structure information required to construct an ASN.1 RelativeDistinguishedName object, defined as:
RelativeDistinguishedName ::=
SET OF AttributeTypeAndValue AttributeTypeAndValue ::= SEQUENCE {
type AttributeType,
value AttributeValue }AttributeType ::= OBJECT IDENTIFIER
AttributeValue ::= ANY DEFINED BY AttributeType
DirectoryString ::= CHOICE {
teletexString TeletexString (SIZE (1..MAX)),
printableString PrintableString (SIZE (1..MAX)),
universalString UniversalString (SIZE (1..MAX)),
utf8String UTF8String (SIZE (1..MAX)),
bmpString BMPString (SIZE (1..MAX)) }
This example shows how you could populate a nameAttr strucutre to define a RelativeDistinguisedName:
relativeDN pRDNs[] = { {pNames1, 1}, {pNames2, 1}, {pNames3, 1}, {pNames4, 1}, {pNames5, 1}, {pNames6, 1}, {pNames7, 1} };
nameAttr pNames1[] = { { countryName_OID, UTF8STRING, (ubyte*)"US", 2}}; // country nameAttr pNames2[] = { { stateOrProvinceName_OID, UTF8STRING, (ubyte*)"California", 10}}; // state or province nameAttr pNames3[] = { { localityName_OID, UTF8STRING, (ubyte*)"San Francisco", 10}}; // locality nameAttr pNames4[] = { { organizationName_OID, UTF8STRING, (ubyte*)"Digicert Corporation", 18}}; // company name nameAttr pNames5[] = { { organizationalUnitName_OID, UTF8STRING, (ubyte*)"Engineering", 11}}; // organizational unit nameAttr pNames6[] = { { commonName_OID, UTF8STRING, (ubyte*)"anexample.mocana.com", 20}}; // common name nameAttr pNames7[] = { { pkcs9_emailAddress_OID, UTF8STRING, (ubyte*)"anexample@mocana.com", 20}}; // pkcs-9-at-emailAddress
(and @since; accidentally omitted, forever...)
| ubyte4 relativeDN::nameAttrCount |
Number of nameAttr objects in pNameAttr..
| nameAttr* relativeDN::pNameAttr |
This field identifies AttributeTypeAndValues that make up an RDN field.