/// The security context for secure usage
SecurityContext securityContext = SecurityContext.defaultContext;
/// Callback function to handle bad certificate. if true, ignore the error.
bool Function(X509Certificate certificate)? onBadCertificate;
define these in mqtt provider to prevent man in the middle attacks. security context should be the ca certificate given by let's encrypt.
this is alerady added in config/ssl.dart
the callback function should be to what to do when the validation fails
define these in mqtt provider to prevent man in the middle attacks. security context should be the ca certificate given by let's encrypt.this is alerady added in config/ssl.dartthe callback function should be to what to do when the validation fails