Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,21 @@ public partial class LdapSessionOptions
{
private static void PALCertFreeCRLContext(IntPtr certPtr) { /* No op */ }

public bool SecureSocketLayer { get; set; }
private bool _secureSocketLayer;

public bool SecureSocketLayer
{
get
{
if (_connection._disposed) throw new ObjectDisposedException(GetType().Name);
return _secureSocketLayer;
}
set
{
if (_connection._disposed) throw new ObjectDisposedException(GetType().Name);
_secureSocketLayer = value;
}
}

public int ProtocolVersion
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public partial class LdapSessionOptions
{
private static void PALCertFreeCRLContext(IntPtr certPtr) => Interop.Ldap.CertFreeCRLContext(certPtr);

[SupportedOSPlatform("windows")]
public bool SecureSocketLayer
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public void SecureSocketLayer_Set_GetReturnsExpected(bool value)
}

[Fact]
[PlatformSpecific(TestPlatforms.Windows)]
public void SecureSocketLayer_GetSetWhenDisposed_ThrowsObjectDisposedException()
{
var connection = new LdapConnection("server");
Expand Down