X509_ATTRIBUTE_create_by_NID function
X509_ATTRIBUTE_create_by_NID returns a newly-allocated X509_ATTRIBUTE of
type nid, or NULL on error. The value is determined as in
X509_ATTRIBUTE_set1_data.
If attr is non-NULL, the resulting X509_ATTRIBUTE is also written to
*attr. If *attr was non-NULL when the function was called, *attr is
reused instead of creating a new object.
WARNING: The interpretation of attrtype, data, and len is complex and
error-prone. See X509_ATTRIBUTE_set1_data for details.
WARNING: The object reuse form is deprecated and may be removed in the future. It also currently incorrectly appends to the reused object's value set rather than overwriting it.
Implementation
@meta.RecordUse()
@ffi.Native<
ffi.Pointer<X509_ATTRIBUTE> Function(
ffi.Pointer<ffi.Pointer<X509_ATTRIBUTE>>,
ffi.Int,
ffi.Int,
ffi.Pointer<ffi.Void>,
ffi.Int,
)
>(symbol: 'bssl_dart_X509_ATTRIBUTE_create_by_NID')
external ffi.Pointer<X509_ATTRIBUTE> X509_ATTRIBUTE_create_by_NID(
ffi.Pointer<ffi.Pointer<X509_ATTRIBUTE>> attr,
int nid,
int attrtype,
ffi.Pointer<ffi.Void> data,
int len,
);