onBadCertificate property

  1. @override
BadCertificateCallback onBadCertificate
override

Callback for VM clients when an SSL exception occurs due to an untrusted or unverifiable certificate.

Clients can support establishing an SSL connection despite this exception by selectively returning true for these options. For example, when debugging with local, self-signed certificates, it can be helpful to return true from this method for all certificates.

Implementation

@override
BadCertificateCallback get onBadCertificate =>
    baseClient?.onBadCertificate ?? super.onBadCertificate;
  1. @override
void onBadCertificate=(BadCertificateCallback onBadCertificate)

Callback for VM clients when an SSL exception occurs due to an untrusted or unverifiable certificate.

Clients can support establishing an SSL connection despite this exception by selectively returning true for these options. For example, when debugging with local, self-signed certificates, it can be helpful to return true from this method for all certificates.

Implementation

@override
set onBadCertificate(BadCertificateCallback onBadCertificate) {
  if (baseClient != null) {
    baseClient!.onBadCertificate = onBadCertificate;
  } else {
    super.onBadCertificate = onBadCertificate;
  }
}