// upgrade connection via bind request (same physical connection - TLS)
// -------------------------------------------------------------------
ctx.addToEnvironment( Context.SECURITY_PRINCIPAL, "uid=admin,ou=system" );
ctx.addToEnvironment( Context.SECURITY_CREDENTIALS, "secret" );
ctx.addToEnvironment( Context.SECURITY_AUTHENTICATION, "simple" );
ctx.reconnect( null );
// -------------------------------------------------------------------
// do a search and confirm
// -------------------------------------------------------------------