mdarifmustafa / vt-middleware

Automatically exported from code.google.com/p/vt-middleware
0 stars 0 forks source link

vt-ldap: do not close the TLS response by default on connection close #89

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When Ldap#close() is called, if the underlying connection is using TLS the TLS 
response is also closed:
http://download.oracle.com/javase/1.5.0/docs/api/javax/naming/ldap/StartTlsRespo
nse.html#close%28%29

This causes problems with certain versions of iPlanet directory server, which 
hang up the connection:
http://java.sun.com/products/jndi/tutorial/ldap/ext/starttls.html

Change the TlsConnectionHandler so that by default it does not close the TLS 
response when the connection is closed.
Provide a property to change this behavior.

It's worth noting that OpenLDAP tears down the entire connection when stopTLS 
is called, making the subsequent calls to close the context irrelevant.

Original issue reported on code.google.com by dfis...@gmail.com on 24 Aug 2010 at 5:47

GoogleCodeExporter commented 8 years ago
Added:
  TlsConnectionHandler#setStopTlsOnClose(boolean)
  TlsConnectionHandler#getStopTlsOnClose() boolean

Fixed in r1510.

Original comment by dfis...@gmail.com on 25 Aug 2010 at 12:50