On Fri, Feb 18, 2011, Patrick Patterson wrote:
> Hi Steve:
>
> On 2011-02-18, at 1:29 PM, Dr. Stephen Henson wrote:
> >
> > I'm not sure what you mean by "wrapped in an explicit application tag".
>
>
> What I mean is that I have the usual encoding of ContentInfo (as per RFC 3825
> ) of:
>
> ContentInfo ::= SEQUENCE {
> contentType ContentType,
> content [0] EXPLICIT ANY DEFINED BY contentType }
>
> has been replaced, in this case by:
>
> ContentInfo ::= [APPLICATION XX] SEQUENCE {
> contentType ContentType,
> content [0] EXPLICIT ANY DEFINED BY contentType }
>
> So - is there any easy way to encode this without rewriting the CMS
> definitions?
>
Yes the ANS1 definitions can be used in other modules.
Is that all you need or would the modified ContentInfo be used as part of
another structure?
If you just need that one thing something called an ASN1_ITEM_TEMPLATE should
do the trick. Have a look in crypto/x509v3/v3_genn.c for an example. That is
used as a SEQUENCE OF: you'd need to change the flags to use an EXPLICIT
application tag.
Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]