Is your feature request related to a problem? Please describe.
I am testing with self-signed certificates and noticed that RedisConfiguration does not include the CertifcateSelection event. Yet this event is part of StackExchange.Redis and is required for validating self-signed certificates.
On: https://redis.io/docs/latest/develop/clients/dotnet/connect/
Under the section: 'Connect to your production Redis with TLS', there is an example of how to use the CertificateSelection event in conjunction with ValidateServerCertificate.
Describe the solution you'd like
Two additions are needed.
- In the
RedisConfiguration class, after the private fields, add the following:
/// <summary>
/// A LocalCertificateSelectionCallback delegate responsible for selecting the certificate used for authentication; note
/// that this cannot be specified in the configuration-string.
/// </summary>
public event LocalCertificateSelectionCallback? CertificateSelection;
- Further down, in the
ConfigurationOptions getter, add the following:
newOptions.CertificateSelection += CertificateSelection;
Describe alternatives you've considered
It should be possible to add a self-signed certificate ca to the Trusted Root Certification Authorities, but I've not been able to get it to work this way.
Additional context
I've created a fork, implemented these changes, built the packages, and they test okay. I've been using without issue. I can do a PR if you want.
Is your feature request related to a problem? Please describe.
I am testing with self-signed certificates and noticed that RedisConfiguration does not include the CertifcateSelection event. Yet this event is part of StackExchange.Redis and is required for validating self-signed certificates.
On: https://redis.io/docs/latest/develop/clients/dotnet/connect/
Under the section: 'Connect to your production Redis with TLS', there is an example of how to use the
CertificateSelectionevent in conjunction withValidateServerCertificate.Describe the solution you'd like
Two additions are needed.
RedisConfigurationclass, after the private fields, add the following:ConfigurationOptionsgetter, add the following:Describe alternatives you've considered
It should be possible to add a self-signed certificate ca to the Trusted Root Certification Authorities, but I've not been able to get it to work this way.
Additional context
I've created a fork, implemented these changes, built the packages, and they test okay. I've been using without issue. I can do a PR if you want.