[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PKINIT status?



G'day,

Luke Howard wrote:

> This should be generated by the ASN.1 compiler. Do you have some code
> like:
> 
>         if (t->type == TSequence && preservep) {
>             space(level + 1);
>             fprintf(headerfile, "heim_octet_string _save;\n");
>         }
> 
> in lib/asn1/gen.c?

The code exists in gen.c, but the offending line in pkinit.c is:

   len = peer1->u.issuerAndSerialNumber.issuer._save.length;

pkinit.asn1 imports IssuerAndSerialNumber from CMS.asn1, which uses the 
type Name (imported from rfc2459.asn1), which is defined as follows:

/*
Name ::= CHOICE {
   rdnSequence     RDNSequence

}
*/

Which gets a generated C type of:

typedef struct Name {
   enum {
     choice_Name_rdnSequence
   } element;
   union {
     RDNSequence rdnSequence;
   } u;
} Name;

I'm using snapshot asn1-choice-20050207.tar.gz to generate this code, 
but I don't get a '_save' field generated for this type.

> (I'm just looking at our Heimdal tree, which is based on some earlier
> snapshots, so we may be looking at different things. PKINIT works fine
> for us, indeed we're shipping a product that includes it.)

I would appreciate knowing which snapshots you used.

-- Geoff