validateBadCertificate method
Implementation
@override
bool validateBadCertificate(
X509Certificate cert,
String host,
int port,
Map<String, bool> fingerprints,
) {
// Certificate Authority Verification
final fingerprint = sha256.convert(cert.der).toString();
if (fingerprint.isEmpty) {
return false;
}
// Validate
final hasMatches = customValidator.validate(cert, host, port);
return (fingerprints[fingerprint] == true) && hasMatches;
}