TrustCore SDK NanoCert API reference  version 7.0
CMSRecipientId Struct Reference

CMS recipient identification information. More...

Data Fields

union {
   CMSKeyAgreeRecipientId   karid
 
   CMSKeyTransRecipientId   ktrid
 
ri
 
ubyte4 type
 

Detailed Description

CMS recipient identification information that is passed to a CMS_GetPrivateKey() call.

The CMSRecipientId structure is defined as:

    typedef struct CMSRecipientId
    {
        ubyte4 type;
        union
        {
            CMSKeyTransRecipientId    ktrid;   // type = NO_TAG
            CMSKeyAgreeRecipientId    karid;   // type = 1
        } ri;
    } CMSRecipientId;

The layout of this structure shadows that of the RecipientInfo object.

      RecipientInfo ::= CHOICE {
        ktri KeyTransRecipientInfo,
        kari [1] KeyAgreeRecipientInfo,
        kekri [2] KEKRecipientInfo }
Note
The KEKRecipientInfo object is omitted from the CMSRecipientId structure.

The ktrid member supplies a CMSKeyTransRecipientId structure, and the karid member supplies a CMSKeyAgreeRecipientId structure.

When your callback function must interpret a CMSRecipientId structure, read the type member.

  • If the type is NO_TAG, the ktrid member applies, and this structure provides information from a KeyTransRecipientInfo object.
  • If the type is 1 (one), the karid member applies, and this structure provides information from a KeyAgreeRecipientInfo object.

The documentation for this struct was generated from the following file: