X509_cmp function
X509_cmp compares |a| and |b| and returns zero if they are equal, a negative number if |b| sorts after |a| and a negative number if |a| sorts after |b|. The sort order implemented by this function is arbitrary and does not reflect properties of the certificate such as expiry. Applications should not rely on the order itself.
TODO(https://crbug.com/boringssl/355): This function works by comparing a cached hash of the encoded certificate. If |a| or |b| could not be serialized, the current behavior is to compare all unencodable certificates as equal. This function should only be used with |X509| objects that were parsed from bytes and never mutated.
Implementation
@meta.RecordUse()
@ffi.Native<ffi.Int Function(ffi.Pointer<X509>, ffi.Pointer<X509>)>(
symbol: 'bssl_dart_X509_cmp',
)
external int X509_cmp(
ffi.Pointer<X509> a,
ffi.Pointer<X509> b,
);