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