Lines Matching refs:choice

376 	    const struct asn1_template *choice = t->ptr;
377 unsigned int *element = DPO(data, choice->offset);
381 for (i = 1; i < A1_HEADER_LEN(choice) + 1; i++) {
382 /* should match first tag instead, store it in choice.tt */
383 ret = _asn1_decode(choice[i].ptr, 0, p, len,
384 DPO(data, choice[i].offset), &datalen);
393 if (i >= A1_HEADER_LEN(choice) + 1) {
394 if (choice->tt == 0)
399 DPO(data, choice->tt), &datalen);
661 const struct asn1_template *choice = t->ptr;
662 const unsigned int *element = DPOC(data, choice->offset);
666 if (*element > A1_HEADER_LEN(choice)) {
673 DPOC(data, choice->tt), &datalen);
675 choice += *element;
676 el = DPOC(data, choice->offset);
677 ret = _asn1_encode(choice->ptr, p, len, el, &datalen);
796 const struct asn1_template *choice = t->ptr;
797 const unsigned int *element = DPOC(data, choice->offset);
799 if (*element > A1_HEADER_LEN(choice))
803 ret += der_length_octet_string(DPOC(data, choice->tt));
805 choice += *element;
806 ret += _asn1_length(choice->ptr, DPOC(data, choice->offset));
902 const struct asn1_template *choice = t->ptr;
903 const unsigned int *element = DPOC(data, choice->offset);
905 if (*element > A1_HEADER_LEN(choice))
909 der_free_octet_string(DPO(data, choice->tt));
911 choice += *element;
912 _asn1_free(choice->ptr, DPO(data, choice->offset));
1063 const struct asn1_template *choice = t->ptr;
1064 const unsigned int *felement = DPOC(from, choice->offset);
1065 unsigned int *telement = DPO(to, choice->offset);
1067 if (*felement > A1_HEADER_LEN(choice))
1073 ret = der_copy_octet_string(DPOC(from, choice->tt), DPO(to, choice->tt));
1075 choice += *felement;
1076 ret = _asn1_copy(choice->ptr,
1077 DPOC(from, choice->offset),
1078 DPO(to, choice->offset));