Open Rob4001 opened 3 years ago
I encountered the same problem, would really appreciate fixing this issue.
In modern .NET versions (like at least v6), this seems to be fixed; https://github.com/dotnet/runtime/blob/v6.0.0/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs
As of .NET 5 System.DirectoryServices.Protocols has linux support, using the openldap c libraries.
These libraries do not support the UseSSL Flag: https://github.com/dotnet/runtime/issues/36888#issuecomment-648457142 which causes a PlatformNotSupportedException when trying to use this library
Could we put a runtime specific case around the setting of this flag ? https://github.com/madhatter22/LinqToLdap/blob/af3187632c70242ae76a86117994c95c771cb60c/LinqToLdap/ConnectionFactoryBase.cs#L138
https://github.com/dotnet/runtime/blob/c5ae5bf75635cb395d05567f6f37be2dc4a90afd/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs#L13
My current workaround is to duplicate the connection factories and override the BuildConnection call.
Thanks