{
const ASN1_AUX *aux;
int *lck, ret;
- if(it->itype != ASN1_ITYPE_SEQUENCE) return 0;
+ if((it->itype != ASN1_ITYPE_SEQUENCE)
+ && (it->itype != ASN1_ITYPE_NDEF_SEQUENCE)) return 0;
aux = it->funcs;
if(!aux || !(aux->flags & ASN1_AFLG_REFCOUNT)) return 0;
lck = offset2ptr(*pval, aux->ref_offset);
if(!(tt->flags & ASN1_TFLG_ADB_MASK)) return tt;
/* Else ANY DEFINED BY ... get the table */
- adb = tt->item;
+ adb = ASN1_ADB_ptr(tt->item);
/* Get the selector field */
sfld = offset2ptr(*pval, adb->offset);