i2d_re_X509_tbs function

  1. @RecordUse.new()
  2. @Native<Int Function(Pointer<X509>, Pointer<Pointer<Uint8>>)>(ffi.Pointer<X509>, ffi.Pointer<ffi.Pointer<ffi.Uint8>>)>(symbol: 'bssl_dart_i2d_re_X509_tbs')
int i2d_re_X509_tbs(
  1. Pointer<X509> x509,
  2. Pointer<Pointer<Uint8>> outp
)

i2d_re_X509_tbs serializes the TBSCertificate portion of |x509|, as described in |i2d_SAMPLE|.

This function re-encodes the TBSCertificate and may not reflect |x509|'s original encoding. It may be used to manually generate a signature for a new certificate. To verify certificates, use |i2d_X509_tbs| instead.

Unlike |i2d_X509_tbs|, this function is not |const| and thus may not be to use concurrently with other functions that access |x509|. It mutates |x509| by dropping the cached encoding. This function is intended to be used during certificate construction, where |x509| is still single-threaded and being mutated.

Implementation

@meta.RecordUse()
@ffi.Native<
  ffi.Int Function(ffi.Pointer<X509>, ffi.Pointer<ffi.Pointer<ffi.Uint8>>)
>(symbol: 'bssl_dart_i2d_re_X509_tbs')
external int i2d_re_X509_tbs(
  ffi.Pointer<X509> x509,
  ffi.Pointer<ffi.Pointer<ffi.Uint8>> outp,
);