X509v3_get_ext_by_critical function

  1. @RecordUse.new()
  2. @Native<Int Function(Pointer<X509_EXTENSIONS>, Int, Int)>(ffi.Pointer<stack_st_X509_EXTENSION>, ffi.Int, ffi.Int)>(symbol: 'bssl_dart_X509v3_get_ext_by_critical')
int X509v3_get_ext_by_critical(
  1. Pointer<X509_EXTENSIONS> x,
  2. int crit,
  3. int lastpos
)

X509v3_get_ext_by_critical returns the index of the first extension in x whose critical bit matches crit, or a negative number if no such extension was found.

If lastpos is non-negative, it begins searching at lastpos + 1. Callers can thus loop over all matching extensions by first passing -1 and then passing the previously-returned value until no match is returned.

Implementation

@meta.RecordUse()
@ffi.Native<
  ffi.Int Function(ffi.Pointer<stack_st_X509_EXTENSION>, ffi.Int, ffi.Int)
>(symbol: 'bssl_dart_X509v3_get_ext_by_critical')
external int X509v3_get_ext_by_critical(
  ffi.Pointer<stack_st_X509_EXTENSION> x,
  int crit,
  int lastpos,
);