X509v3_add_ext function

  1. @RecordUse.new()
  2. @Native<Pointer<X509_EXTENSIONS> Function(Pointer<Pointer<X509_EXTENSIONS>>, Pointer<X509_EXTENSION>, Int)>(ffi.Pointer<ffi.Pointer<stack_st_X509_EXTENSION>>, ffi.Pointer<X509_EXTENSION>, ffi.Int)>(symbol: 'bssl_dart_X509v3_add_ext')
Pointer<X509_EXTENSIONS> X509v3_add_ext(
  1. Pointer<Pointer<X509_EXTENSIONS>> x,
  2. Pointer<X509_EXTENSION> ex,
  3. int loc
)

X509v3_add_ext adds a copy of |ex| to the extension list in |*x|. If |*x| is NULL, it allocates a new |STACK_OF(X509_EXTENSION)| to hold the copy and sets |*x| to the new list. It returns |*x| on success and NULL on error. The caller retains ownership of |ex| and can release it independently of |*x|.

The new extension is inserted at index |loc|, shifting extensions to the right. If |loc| is -1 or out of bounds, the new extension is appended to the list.

Implementation

@meta.RecordUse()
@ffi.Native<
  ffi.Pointer<stack_st_X509_EXTENSION> Function(
    ffi.Pointer<ffi.Pointer<stack_st_X509_EXTENSION>>,
    ffi.Pointer<X509_EXTENSION>,
    ffi.Int,
  )
>(symbol: 'bssl_dart_X509v3_add_ext')
external ffi.Pointer<stack_st_X509_EXTENSION> X509v3_add_ext(
  ffi.Pointer<ffi.Pointer<stack_st_X509_EXTENSION>> x,
  ffi.Pointer<X509_EXTENSION> ex,
  int loc,
);