Examples of StartTLSRequest


Examples of javax.naming.ldap.StartTlsRequest

        LOG.debug( "About to get initial context" );
        LdapContext ctx = new InitialLdapContext( env, null );

        // Start TLS
        LOG.debug( "About send startTls extended operation" );
        StartTlsResponse tls = ( StartTlsResponse ) ctx.extendedOperation( new StartTlsRequest() );
        LOG.debug( "Extended operation issued" );
        tls.setHostnameVerifier( new HostnameVerifier() {
            public boolean verify( String hostname, SSLSession session )
            {
                return true;
View Full Code Here

Examples of javax.naming.ldap.StartTlsRequest

            LOG.debug( "About to get initial context" );
            LdapContext ctx = new InitialLdapContext( env, null );
   
            // Start TLS
            LOG.debug( "About send startTls extended operation" );
            StartTlsResponse tls = ( StartTlsResponse ) ctx.extendedOperation( new StartTlsRequest() );
            LOG.debug( "Extended operation issued" );
            tls.setHostnameVerifier( new HostnameVerifier() {
                public boolean verify( String hostname, SSLSession session )
                {
                    return true;
View Full Code Here

Examples of javax.naming.ldap.StartTlsRequest

     */
    public void testExtendedOperation002() throws Exception {
        System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
                        "org.apache.harmony.jndi.tests.javax.naming.spi.mock.ldap.MockContextFactory");
        InitialLdapContext x = new InitialLdapContext();
        StartTlsResponse f = (StartTlsResponse)x.extendedOperation(new StartTlsRequest());
        assertNotNull(f);
        x.close();
    }
View Full Code Here

Examples of javax.naming.ldap.StartTlsRequest

                    if ( useStartTLS )
                    {
                        try
                        {
                            StartTlsResponse tls = ( StartTlsResponse ) context
                                .extendedOperation( new StartTlsRequest() );
                            tls.setHostnameVerifier( new HostnameVerifier()
                            {
                                public boolean verify( String arg0, SSLSession arg1 )
                                {
                                    return true;
View Full Code Here

Examples of javax.naming.ldap.StartTlsRequest

    protected DirContext getDirContext() throws NamingException, CommunicationException, ConnectException {
        DirContext dirCtx = null;
        try {
      if (this.isTlsSecurityConnection()) {
        dirCtx = new InitialLdapContext(this.getParams(true), null);
        StartTlsResponse tls = (StartTlsResponse) ((InitialLdapContext) dirCtx).extendedOperation(new StartTlsRequest());
        if (this.isTlsFreeSecurityConnection()) {
          // Set the (our) HostVerifier
          tls.setHostnameVerifier(new MyTLSHostnameVerifier());
          SSLSocketFactory sslsf = null;
          try {
View Full Code Here

Examples of javax.naming.ldap.StartTlsRequest

                    if ( useStartTLS )
                    {
                        try
                        {
                            StartTlsResponse tls = ( StartTlsResponse ) context
                                .extendedOperation( new StartTlsRequest() );
                            // deactivate host name verification at this level,
                            // host name verification is done in StudioTrustManager
                            tls.setHostnameVerifier( new HostnameVerifier()
                            {
                                public boolean verify( String hostname, SSLSession session )
View Full Code Here

Examples of javax.naming.ldap.StartTlsRequest

          StartTlsResponse tls;

          InitialLdapContext result = new InitialLdapContext(fEnv, null);

          tls = (StartTlsResponse) result.extendedOperation(
              new StartTlsRequest());
          tls.setHostnameVerifier(fVerifier);
          try
          {
            tls.negotiate(new TrustedSocketFactory(fTrustManager,fKeyManager));
          }
View Full Code Here

Examples of javax.naming.ldap.StartTlsRequest

                    if ( useStartTLS )
                    {
                        try
                        {
                            StartTlsResponse tls = ( StartTlsResponse ) context
                                .extendedOperation( new StartTlsRequest() );
                            tls.setHostnameVerifier( new HostnameVerifier()
                            {
                                public boolean verify( String arg0, SSLSession arg1 )
                                {
                                    return true;
View Full Code Here

Examples of org.apache.james.imap.message.request.StartTLSRequest

     * org.apache.james.imap.decode.ImapRequestLineReader, java.lang.String,
     * org.apache.james.imap.api.process.ImapSession)
     */
    protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
        request.eol();
        return new StartTLSRequest(tag, command);
    }
View Full Code Here

Examples of org.apache.james.imap.message.request.StartTLSRequest

     * org.apache.james.imap.decode.ImapRequestLineReader, java.lang.String,
     * org.apache.james.imap.api.process.ImapSession)
     */
    protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
        request.eol();
        return new StartTLSRequest(tag, command);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.