Callback function to handle bad certificate. if true, ignore the error.
bool Function(Object certificate)? onBadCertificate;