How do you use WithClientCertificate with secure websockets (wss) as a server?
- Dominant language
- C#
- Stars
- 5.1k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe your question
I have tried to use WithClientCertificate to always return true and output some message, but it doesn't appear as though the RemoteCertificateValidationCallback is being called at all:
```C#
public void ConfigureMqttServerOptions(MqttServerOptionsBuilder options)
{
options.WithConnectionValidator(this);
options.WithClientCertificate((sender, cert, chain, sslError) =>
{
Console.WriteLine("Validate certificate: {0}", sslError);
return true;
});
}
```
I am seeing output from the connection validator, however:
```C#
public Task ValidateConnectionAsync(MqttConnectionValidatorContext context)
{
Logger.LogInformation($"Opening connection [Secure={context.IsSecureConnection}]");
return Task.CompletedTask;
}
```
### Which project is your question related to?
- Server
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.