projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf2938f
)
Enable more LDAP TLS tests on linux (#54377)
author
iinuwa
<isaiah.inuwa@moody.edu>
Thu, 1 Jul 2021 09:59:59 +0000
(
04:59
-0500)
committer
GitHub
<noreply@github.com>
Thu, 1 Jul 2021 09:59:59 +0000
(11:59 +0200)
* Remove SupportedOsPlatform attribute for LDAP TLS
* Throw ObjectDisposedException when setting LDAP TLS settings on Linux.
src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs
patch
|
blob
|
history
src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs
patch
|
blob
|
history
src/libraries/System.DirectoryServices.Protocols/tests/LdapSessionOptionsTests.cs
patch
|
blob
|
history
diff --git
a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs
b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs
index
b7bcca2
..
dbedfdb
100644
(file)
--- a/
src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs
+++ b/
src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Linux.cs
@@
-9,7
+9,21
@@
namespace System.DirectoryServices.Protocols
{
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
{
diff --git
a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs
b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs
index
c587f42
..
14b8878
100644
(file)
--- a/
src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs
+++ b/
src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs
@@
-9,7
+9,6
@@
namespace System.DirectoryServices.Protocols
{
private static void PALCertFreeCRLContext(IntPtr certPtr) => Interop.Ldap.CertFreeCRLContext(certPtr);
- [SupportedOSPlatform("windows")]
public bool SecureSocketLayer
{
get
diff --git
a/src/libraries/System.DirectoryServices.Protocols/tests/LdapSessionOptionsTests.cs
b/src/libraries/System.DirectoryServices.Protocols/tests/LdapSessionOptionsTests.cs
index
ef1436b
..
77cdf83
100644
(file)
--- a/
src/libraries/System.DirectoryServices.Protocols/tests/LdapSessionOptionsTests.cs
+++ b/
src/libraries/System.DirectoryServices.Protocols/tests/LdapSessionOptionsTests.cs
@@
-64,7
+64,6
@@
namespace System.DirectoryServices.Protocols.Tests
}
[Fact]
- [PlatformSpecific(TestPlatforms.Windows)]
public void SecureSocketLayer_GetSetWhenDisposed_ThrowsObjectDisposedException()
{
var connection = new LdapConnection("server");