Closed rido-min closed 1 year ago
I was waiting to see if https://github.com/dotnet/MQTTnet/pull/1851 was merged, but unfortunately we dont have any ETA for now.
so I'd like to merge this PR, as this will be used across other MQTT deliverables
@CIPop any thoughts?
@rido-min the chain validation routine used is not advised for TLS validation. Ideally, TLS validation is performed by the TLS stack (as in the MQTTNet PR).
Because the validation might be dangerous in some instances, I recommend making it discoverable for the application developer / static analysis tools. This is what I have in mind:
This way, the app-code must contain RemoteCertificateValidationCallback
, making it obvious that custom certificate validation is being used.
Updates the ChainValidation to reuse the chain provided by the certificate validation callback.