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


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

Examples of SSL/TLS implementation

Started byMark <i@dontgetlotsofspamanymore.net>
First post2018-09-10 15:11 +0100
Last post2018-09-12 14:59 -0400
Articles 4 — 2 participants

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


Contents

  Examples of SSL/TLS implementation Mark <i@dontgetlotsofspamanymore.net> - 2018-09-10 15:11 +0100
    Re: Examples of SSL/TLS implementation Arne Vajhøj <arne@vajhoej.dk> - 2018-09-10 10:54 -0400
      Re: Examples of SSL/TLS implementation Mark <i@dontgetlotsofspamanymore.net> - 2018-09-11 08:26 +0100
        Re: Examples of SSL/TLS implementation Arne Vajhøj <arne@vajhoej.dk> - 2018-09-12 14:59 -0400

#38589 — Examples of SSL/TLS implementation

FromMark <i@dontgetlotsofspamanymore.net>
Date2018-09-10 15:11 +0100
SubjectExamples of SSL/TLS implementation
Message-ID<fkucpd192b10vn191f0mirlq7ctp2lbv8s@4ax.com>
Hi,

I am looking for good examples of SSL/TLS implementation in Java.  I
can find plenty using HTTPS, but this is a propratory protocol.  I
just need to connect to a TLS server socket and check certificates
etc.  Then just send and receive data.

More specifically I am confused about how to use SSLSocketFactory.
When should the getDefault() method be used and when to use the
createSocket() methods.

-- 
I am the God of Hell fire and I bring you: Brexit

[toc] | [next] | [standalone]


#38590

FromArne Vajhøj <arne@vajhoej.dk>
Date2018-09-10 10:54 -0400
Message-ID<pn60i9$j5v$1@gioia.aioe.org>
In reply to#38589
On 9/10/2018 10:11 AM, Mark wrote:
> I am looking for good examples of SSL/TLS implementation in Java.  I
> can find plenty using HTTPS, but this is a propratory protocol.  I
> just need to connect to a TLS server socket and check certificates
> etc.  Then just send and receive data.
> 
> More specifically I am confused about how to use SSLSocketFactory.
> When should the getDefault() method be used and when to use the
> createSocket() methods.

http://www.vajhoej.dk/arne/articles/socket2.html#sslcli
http://www.vajhoej.dk/arne/articles/socket4.html#sslcli

have an example (the SSL part is the same for the two).

Arne



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


#38591

FromMark <i@dontgetlotsofspamanymore.net>
Date2018-09-11 08:26 +0100
Message-ID<ofrepd1asfgsv9bb91qmtoo0m89k5dt3q0@4ax.com>
In reply to#38590
On Mon, 10 Sep 2018 10:54:00 -0400, Arne Vajhøj <arne@vajhoej.dk>
wrote:

>On 9/10/2018 10:11 AM, Mark wrote:
>> I am looking for good examples of SSL/TLS implementation in Java.  I
>> can find plenty using HTTPS, but this is a propratory protocol.  I
>> just need to connect to a TLS server socket and check certificates
>> etc.  Then just send and receive data.
>> 
>> More specifically I am confused about how to use SSLSocketFactory.
>> When should the getDefault() method be used and when to use the
>> createSocket() methods.
>
>http://www.vajhoej.dk/arne/articles/socket2.html#sslcli
>http://www.vajhoej.dk/arne/articles/socket4.html#sslcli
>
>have an example (the SSL part is the same for the two).

Thanks.  How can I change this to only accept the particular
(specified) certificates?

-- 
I am the God of Hell fire and I bring you: Brexit

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


#38592

FromArne Vajhøj <arne@vajhoej.dk>
Date2018-09-12 14:59 -0400
Message-ID<pnbnmn$1v0u$1@gioia.aioe.org>
In reply to#38591
On 9/11/2018 3:26 AM, Mark wrote:
> On Mon, 10 Sep 2018 10:54:00 -0400, Arne Vajhøj <arne@vajhoej.dk>
> wrote:
> 
>> On 9/10/2018 10:11 AM, Mark wrote:
>>> I am looking for good examples of SSL/TLS implementation in Java.  I
>>> can find plenty using HTTPS, but this is a propratory protocol.  I
>>> just need to connect to a TLS server socket and check certificates
>>> etc.  Then just send and receive data.
>>>
>>> More specifically I am confused about how to use SSLSocketFactory.
>>> When should the getDefault() method be used and when to use the
>>> createSocket() methods.
>>
>> http://www.vajhoej.dk/arne/articles/socket2.html#sslcli
>> http://www.vajhoej.dk/arne/articles/socket4.html#sslcli
>>
>> have an example (the SSL part is the same for the two).
> 
> Thanks.  How can I change this to only accept the particular
> (specified) certificates?

The checkServerTrusted has access to the certificate and
can throw a CertificateException if it does not like what it sees.

Arne

[toc] | [prev] | [standalone]


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


csiph-web