CBS_strdup function

  1. @RecordUse.new()
  2. @Native<Int Function(Pointer<CBS>, Pointer<Pointer<Char>>)>(ffi.Pointer<CBS>, ffi.Pointer<ffi.Pointer<ffi.Char>>)>(symbol: 'bssl_dart_CBS_strdup')
int CBS_strdup(
  1. Pointer<CBS> cbs,
  2. Pointer<Pointer<Char>> out_ptr
)

CBS_strdup copies the current contents of cbs into *out_ptr as a NUL-terminated C string. If *out_ptr is not NULL, the contents are freed with OPENSSL_free. It returns one on success and zero on allocation failure. On success, *out_ptr should be freed with OPENSSL_free.

NOTE: If cbs contains NUL bytes, the string will be truncated. Call CBS_contains_zero_byte(cbs) to check for NUL bytes.

Implementation

@meta.RecordUse()
@ffi.Native<
  ffi.Int Function(ffi.Pointer<CBS>, ffi.Pointer<ffi.Pointer<ffi.Char>>)
>(symbol: 'bssl_dart_CBS_strdup')
external int CBS_strdup(
  ffi.Pointer<CBS> cbs,
  ffi.Pointer<ffi.Pointer<ffi.Char>> out_ptr,
);