Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #35041 > unrolled thread

writing a java clinent to support TLS 1.2

Started bymike <mikaelpetterson@hotmail.com>
First post2016-07-21 05:40 -0700
Last post2016-07-22 19:33 -0400
Articles 4 — 3 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  writing a java clinent to support TLS 1.2 mike <mikaelpetterson@hotmail.com> - 2016-07-21 05:40 -0700
    Re: writing a java clinent to support TLS 1.2 Roedy Green <inquiry@mindprod.com> - 2016-07-21 14:42 -0700
      Re: writing a java clinent to support TLS 1.2 mike <mikaelpetterson@hotmail.com> - 2016-07-22 06:45 -0700
    Re: writing a java clinent to support TLS 1.2 Arne Vajhøj <arne@vajhoej.dk> - 2016-07-22 19:33 -0400

#35041 — writing a java clinent to support TLS 1.2

Frommike <mikaelpetterson@hotmail.com>
Date2016-07-21 05:40 -0700
Subjectwriting a java clinent to support TLS 1.2
Message-ID<c626dacc-b027-43e3-9d1b-0e26a7d68dc1@googlegroups.com>
Hi,

We are writing a client in java that shall support TLS 1.2 when connecting to server. We will send NETCONF messages over this connection.

It was quite easy to implement the support, just creating a SSLSocket.

Any ideas on how to verify it?

br,

//mike

[toc] | [next] | [standalone]


#35073

FromRoedy Green <inquiry@mindprod.com>
Date2016-07-21 14:42 -0700
Message-ID<gag2pbl279jla3khm5uble619in1b1t2o8@4ax.com>
In reply to#35041
On Thu, 21 Jul 2016 05:40:07 -0700 (PDT), mike
<mikaelpetterson@hotmail.com> wrote:

>We are writing a client in java that shall support TLS 1.2 when connecting to server. We will send NETCONF messages over this connection.

what would it do that HttpConnection does not?

A practical way to test it would be to download home pages of sites
you find using https:

[toc] | [prev] | [next] | [standalone]


#35085

Frommike <mikaelpetterson@hotmail.com>
Date2016-07-22 06:45 -0700
Message-ID<78812d43-0d5a-4e89-bac6-0f37824e22a1@googlegroups.com>
In reply to#35073
> 
> what would it do that HttpConnection does not?

Not sure I understand your comment fully. It is not 
a webserver to connect to so I cannot use HTTP connection I guess.


> A practical way to test it would be to download home pages of sites
> you find using https:

This is how I set it up now:

 private void createConnection() throws SessionException {
        SSLSocketFactory factory = (SSLSocketFactory) SSLSocketFactory
                .getDefault();
        try {
            socket = (SSLSocket) factory.createSocket(
                    getProperties().getHost(), getProperties().getTlsPort());
            socket.setEnabledProtocols(VERSIONS);

        } catch (UnknownHostException e) {
            throw new SessionException(
                    "Could not find IP address of hostname ", getProperties(),
                    e);
        } catch (IOException e) {
            throw new SessionException("Could not connect to host  ",
                    getProperties(), e);
        }

        logger.trace("Established a TLS connection towards "
                + getProperties().getHost() + ":"
                + getProperties().getTlsPort());
    }

//mike

[toc] | [prev] | [next] | [standalone]


#35098

FromArne Vajhøj <arne@vajhoej.dk>
Date2016-07-22 19:33 -0400
Message-ID<nmuagi$1oup$2@gioia.aioe.org>
In reply to#35041
On 7/21/2016 8:40 AM, mike wrote:
> We are writing a client in java that shall support TLS 1.2 when connecting to server. We will send NETCONF messages over this connection.
>
> It was quite easy to implement the support, just creating a SSLSocket.
>
> Any ideas on how to verify it?

Verify what?

Java has supported TLS 1.2 out of the box since Java 7.

You think Oracle got it wrong or?

Arne

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web