Here is my scenario. I am using .Net with C# (Visual Studio 2005, .net 2)
to
access a Sun LDAP server using SSL. This all works fine. However, one
thing
I'd like to do is to is:
- connect to LDAP server over SSL
- bind anonymously
- run a query
- unbind
- rebind with a specified username/password
- run a query
- close the SSL connection down
The key being that I only want to do the SSL key exchange once. I know
this
is possible, since I've done it using alternate technologies.
So I coded it up as follows:
entry = new DirectoryEntry(path, null, null,
AuthenticationTypes.SecureSocketsLayer);
searchOne(entry...); // The DirectorySearcher gets created here,
etc.
// Reset user/password info
entry.Username = dn;
entry.Password = password;
searchOne(entry...);
Even though this works, underneath the hood, I get 2 ssl connections. Is
there anyway to make this work?
Hope this is clear. Thanks.


|