Lines Matching refs:choice

378 	    const struct asn1_template *choice = t->ptr;
379 unsigned int *element = DPO(data, choice->offset);
383 for (i = 1; i < A1_HEADER_LEN(choice) + 1; i++) {
384 /* should match first tag instead, store it in choice.tt */
385 ret = _asn1_decode(choice[i].ptr, 0, p, len,
386 DPO(data, choice[i].offset), &datalen);
395 if (i >= A1_HEADER_LEN(choice) + 1) {
396 if (choice->tt == 0)
401 DPO(data, choice->tt), &datalen);
663 const struct asn1_template *choice = t->ptr;
664 const unsigned int *element = DPOC(data, choice->offset);
668 if (*element > A1_HEADER_LEN(choice)) {
675 DPOC(data, choice->tt), &datalen);
677 choice += *element;
678 el = DPOC(data, choice->offset);
679 ret = _asn1_encode(choice->ptr, p, len, el, &datalen);
798 const struct asn1_template *choice = t->ptr;
799 const unsigned int *element = DPOC(data, choice->offset);
801 if (*element > A1_HEADER_LEN(choice))
805 ret += der_length_octet_string(DPOC(data, choice->tt));
807 choice += *element;
808 ret += _asn1_length(choice->ptr, DPOC(data, choice->offset));
904 const struct asn1_template *choice = t->ptr;
905 const unsigned int *element = DPOC(data, choice->offset);
907 if (*element > A1_HEADER_LEN(choice))
911 der_free_octet_string(DPO(data, choice->tt));
913 choice += *element;
914 _asn1_free(choice->ptr, DPO(data, choice->offset));
1065 const struct asn1_template *choice = t->ptr;
1066 const unsigned int *felement = DPOC(from, choice->offset);
1067 unsigned int *telement = DPO(to, choice->offset);
1069 if (*felement > A1_HEADER_LEN(choice))
1075 ret = der_copy_octet_string(DPOC(from, choice->tt), DPO(to, choice->tt));
1077 choice += *felement;
1078 ret = _asn1_copy(choice->ptr,
1079 DPOC(from, choice->offset),
1080 DPO(to, choice->offset));