[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
client error connecting using tls
I have a program that connects to a secure ldap server by calling the
following
sequence of functions. (the ldap.conf has TLS_CACERT pointing to the
certificate
file and TLS_REQCERT demand set)
ldap_initialize
ldap_set_option (to set various options such as LDAP_OPT_PROTOCOL_VERSION,
LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_RESTART,
LDAP_OPT_NETWORK_TIMEOUT)
ldap_start_tls_s
ldap_sasl_bind_s
This works correctly and I can do searches to this server.
Later I want to connect to a different secure server. I copy the new
certificate file
over the old file so ldap.conf remains the same except the URI entry is
updated to
the new server. I call ldap_unbind_ext_s on the current connection then
try to repeat
the above initialization sequence but it always fails.
If I restart the process I can connect to the second server first then
when I
try to connect to the first server that fails. I turned up debugging on
the server
and I see the error
Peer does not recognize and trust the CA that issued your certificate..
It seems like the client is remembering something and not allowing me to
change
to a different secure ldap server without killing the process and
starting over.
Is there something I am missing in cleaning up the first connection?