CBS_get_optional_asn1_octet_string function

  1. @RecordUse.new()
  2. @Native<Int Function(Pointer<CBS>, Pointer<CBS>, Pointer<Int>, CBS_ASN1_TAG)>(ffi.Pointer<CBS>, ffi.Pointer<CBS>, ffi.Pointer<ffi.Int>, CBS_ASN1_TAG)>(symbol: 'bssl_dart_CBS_get_optional_asn1_octet_string')
int CBS_get_optional_asn1_octet_string(
  1. Pointer<CBS> cbs,
  2. Pointer<CBS> out,
  3. Pointer<Int> out_present,
  4. int tag,
)

CBS_get_optional_asn1_octet_string gets an optional explicitly-tagged OCTET STRING from |cbs|. If present, it sets |*out| to the string and |*out_present| to one. Otherwise, it sets |*out| to empty and |*out_present| to zero. |out_present| may be NULL. It returns one on success, whether or not the element was present, and zero on decode failure.

Implementation

@meta.RecordUse()
@ffi.Native<
  ffi.Int Function(
    ffi.Pointer<CBS>,
    ffi.Pointer<CBS>,
    ffi.Pointer<ffi.Int>,
    CBS_ASN1_TAG,
  )
>(symbol: 'bssl_dart_CBS_get_optional_asn1_octet_string')
external int CBS_get_optional_asn1_octet_string(
  ffi.Pointer<CBS> cbs,
  ffi.Pointer<CBS> out,
  ffi.Pointer<ffi.Int> out_present,
  int tag,
);