Lines Matching refs:choice
375 const struct asn1_template *choice = t->ptr;
376 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);
668 const struct asn1_template *choice = t->ptr;
669 const unsigned int *element = DPOC(data, choice->offset);
673 choice)) {
680 DPOC(data, choice->tt), &datalen);
682 choice += *element;
683 el = DPOC(data, choice->offset);
684 ret = _asn1_encode(choice->ptr, p, len, el, &datalen);
803 const struct asn1_template *choice = t->ptr;
804 const unsigned int *element = DPOC(data, choice->offset);
806 if (*element > A1_HEADER_LEN(choice))
810 ret += der_length_octet_string(DPOC(data, choice->tt));
812 choice += *element;
813 ret += _asn1_length(choice->ptr, DPOC(data, choice->offset));
909 const struct asn1_template *choice = t->ptr;
910 const unsigned int *element = DPOC(data, choice->offset);
912 if (*element > A1_HEADER_LEN(choice))
916 der_free_octet_string(DPO(data, choice->tt));
918 choice += *element;
919 _asn1_free(choice->ptr, DPO(data, choice->offset));
1070 const struct asn1_template *choice = t->ptr;
1071 const unsigned int *felement = DPOC(from, choice->offset);
1072 unsigned int *telement = DPO(to, choice->offset);
1074 if (*felement > A1_HEADER_LEN(choice))
1080 ret = der_copy_octet_string(DPOC(from, choice->tt), DPO(to, choice->tt));
1082 choice += *felement;
1083 ret = _asn1_copy(choice->ptr,
1084 DPOC(from, choice->offset),
1085 DPO(to, choice->offset));