context.extendedOperation(new StartTlsRequest());
ctx.extendedOperation(new StartTlsRequest()); ctx.extendedOperation(new StartTlsRequest());
@Override protected void doConnect( String username, String password ) throws KettleException { super.doConnect( username, password ); StartTlsRequest tlsRequest = new StartTlsRequest(); try { this.startTlsResponse = (StartTlsResponse) getCtx().extendedOperation( tlsRequest ); /* Starting TLS */ this.startTlsResponse.negotiate( CustomSocketFactory.getDefault() ); } catch ( NamingException e ) { throw new KettleException( e ); } catch ( IOException e ) { throw new KettleException( e ); } }
public AutoclosingLdapContext(Hashtable<?, ?> environment, TlsOption negotiateTls) throws IOException, NamingException { super(environment, null); switch (negotiateTls) { case ATTEMPT: try { tls = (StartTlsResponse) this.extendedOperation(new StartTlsRequest()); tls.negotiate(); } catch (Exception err) { LOGGER.info("Could not negotiate TLS", err); } break; case STRICT: tls = (StartTlsResponse) this.extendedOperation(new StartTlsRequest()); tls.negotiate(); break; case NONE: break; } }
.extendedOperation(new StartTlsRequest()); tls.setHostnameVerifier(new HostnameVerifier() {
/** * This will attempt the startTLS extended operation on the supplied ldap context. * * @param ctx ldap context * * @return start tls response * * @throws NamingException if an error occurs while requesting an extended operation * @throws IOException if an error occurs while negotiating TLS */ protected StartTlsResponse startTLS(final LdapContext ctx) throws NamingException, IOException { final StartTlsResponse tls = (StartTlsResponse) ctx.extendedOperation(new StartTlsRequest()); if (hostnameVerifier != null) { logger.trace("startTLS hostnameVerifier = {}", hostnameVerifier); tls.setHostnameVerifier(hostnameVerifier); } if (sslSocketFactory != null) { logger.trace("startTLS sslSocketFactory = {}", sslSocketFactory); tls.negotiate(sslSocketFactory); } else { tls.negotiate(); } return tls; }
/** * This will attempt the startTLS extended operation on the supplied ldap context. * * @param ctx ldap context * * @return start tls response * * @throws NamingException if an error occurs while requesting an extended operation * @throws IOException if an error occurs while negotiating TLS */ protected StartTlsResponse startTLS(final LdapContext ctx) throws NamingException, IOException { final StartTlsResponse tls = (StartTlsResponse) ctx.extendedOperation(new StartTlsRequest()); if (hostnameVerifier != null) { logger.trace("startTLS hostnameVerifier = {}", hostnameVerifier); tls.setHostnameVerifier(hostnameVerifier); } if (sslSocketFactory != null) { logger.trace("startTLS sslSocketFactory = {}", sslSocketFactory); tls.negotiate(sslSocketFactory); } else { tls.negotiate(); } return tls; }
/** * This will attempt the startTLS extended operation on the supplied ldap context. * * @param ctx ldap context * * @return start tls response * * @throws NamingException if an error occurs while requesting an extended operation * @throws IOException if an error occurs while negotiating TLS */ protected StartTlsResponse startTLS(final LdapContext ctx) throws NamingException, IOException { final StartTlsResponse tls = (StartTlsResponse) ctx.extendedOperation(new StartTlsRequest()); if (hostnameVerifier != null) { logger.trace("startTLS hostnameVerifier = {}", hostnameVerifier); tls.setHostnameVerifier(hostnameVerifier); } if (sslSocketFactory != null) { logger.trace("startTLS sslSocketFactory = {}", sslSocketFactory); tls.negotiate(sslSocketFactory); } else { tls.negotiate(); } return tls; }
StartTlsResponse tls = (StartTlsResponse) context.extendedOperation(new StartTlsRequest());
context.extendedOperation(new StartTlsRequest());
final StartTlsResponse tlsResponse = (StartTlsResponse) ldapCtx.extendedOperation(new StartTlsRequest()); try { if (hostnameVerifier != null) {
.extendedOperation(new StartTlsRequest());
final StartTlsResponse tlsResponse = (StartTlsResponse) ldapCtx.extendedOperation(new StartTlsRequest()); try { if (hostnameVerifier != null) {
StartTlsResponse tls = (StartTlsResponse) ctx.extendedOperation(new StartTlsRequest()); tls.negotiate();
final StartTlsResponse tlsResponse = (StartTlsResponse) ldapCtx.extendedOperation(new StartTlsRequest()); try { if (hostnameVerifier != null) {
StartTlsResponse rsp = (StartTlsResponse)context.extendedOperation(new StartTlsRequest()); if (isTrustAllCertificatesEnabled(tlsConfiguration)) { rsp.negotiate((SSLSocketFactory)TrustAllSocketFactory.getDefault());
ctx.extendedOperation(new StartTlsRequest()); ctx.extendedOperation(new StartTlsRequest());
final StartTlsResponse tlsResponse = (StartTlsResponse) ldapCtx.extendedOperation(new StartTlsRequest()); try { if (hostnameVerifier != null) {
tlsResponse = (StartTlsResponse) ctx.extendedOperation(new StartTlsRequest()); tlsResponse.negotiate(); } catch (IOException e) {
.extendedOperation(new StartTlsRequest());