case ASN1_ETYPE_ANY:
counter -= len2;
break;
+ case ASN1_ETYPE_CHOICE:
+ counter -= len2;
+ break;
default:
return ASN1_DER_ERROR;
break;
break;
p = p->right;
}
+
+ *ret_len = 0;
return ris;
}
else
goto cleanup;
}
}
- else
+ else if (type_field (p->type) != ASN1_ETYPE_CHOICE)
p = p->down;
}
if (ris == ASN1_SUCCESS)
ris =
- _asn1_extract_tag_der (p, der + counter, len - counter, &len2);
+ extract_tag_der_recursive (p, der + counter, len - counter, &len2);
if (ris != ASN1_SUCCESS)
{
if (p->type & CONST_OPTION)
goto cleanup;
}
}
- else
+ else if (type_field (p->type) != ASN1_ETYPE_CHOICE)
p = p->down;
}