Menu

#36 BER_DER context-specific tag.

Enhancement_Request
open
nobody
None
5
2001-02-13
2001-02-13
No

Applies to BER_DER library: If you try to create a template in which one component has a context specific tag but another does not the parser does not parse one might expect. For example:

const uint8 *AuthSafe::original_tags_content[2]=
{contentinfo_Type_tag_ptr,
contentinfo_content_tag_ptr};

const uint8 *AuthSafe::context_tags_content[2]=
{NULL, // <- this is what causes the parser to break
// if you change this to : contentinfo_Type_tag_ptr, then the parse works.
// I believe if you change line 66 of File: XPANDSEQ.C
// from :if (!ContextTags && (!Choices || !Choices[i]))
// to : if ( (!ContextTags || !ContextTags[i]) && (!Choices || !Choices[i]))
// this may fix it.
contentinfo_content_context_tag_ptr
};

DER_COMPLEX_STRUCT AuthSafe::ber_template_content=
{//type tag = sequence
sequence_tag_ptr,
//number of components = 2
2,
//no explicit choices
NULL,
context_tags_content,
original_tags_content,
NULL,
NULL,
"AuthSafe:PKCS12 version 3"
};

### 312_1194 ###

Discussion