CBS_get_any_ber_asn1_element function
- @RecordUse.new()
- @Native<Int Function(Pointer<
CBS> , Pointer<CBS> , Pointer<CBS_ASN1_TAG> , Pointer<Size> , Pointer<Int> , Pointer<Int> )>(ffi.Pointer<CBS>, ffi.Pointer<CBS>, ffi.Pointer<CBS_ASN1_TAG>, ffi.Pointer<ffi.Size>, ffi.Pointer<ffi.Int>, ffi.Pointer<ffi.Int>)>(symbol: 'bssl_dart_CBS_get_any_ber_asn1_element')
CBS_get_any_ber_asn1_element acts the same as CBS_get_any_asn1_element but
also allows indefinite-length elements to be returned and does not enforce
that lengths are minimal. It sets *out_indefinite to one if the length was
indefinite and zero otherwise. If indefinite, *out_header_len and
CBS_len(out) will be equal as only the header is returned (although this is
also true for empty elements so *out_indefinite should be checked). If
out_ber_found is not NULL then it is set to one if any case of invalid DER
but valid BER is found, and to zero otherwise.
This function will not successfully parse an end-of-contents (EOC) as an element. Callers parsing indefinite-length encoding must check for EOC separately.
Implementation
@meta.RecordUse()
@ffi.Native<
ffi.Int Function(
ffi.Pointer<CBS>,
ffi.Pointer<CBS>,
ffi.Pointer<CBS_ASN1_TAG>,
ffi.Pointer<ffi.Size>,
ffi.Pointer<ffi.Int>,
ffi.Pointer<ffi.Int>,
)
>(symbol: 'bssl_dart_CBS_get_any_ber_asn1_element')
external int CBS_get_any_ber_asn1_element(
ffi.Pointer<CBS> cbs,
ffi.Pointer<CBS> out,
ffi.Pointer<CBS_ASN1_TAG> out_tag,
ffi.Pointer<ffi.Size> out_header_len,
ffi.Pointer<ffi.Int> out_ber_found,
ffi.Pointer<ffi.Int> out_indefinite,
);