Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2007

Tip: Looking for answers? Try searching our database.

What's the simplest way to write an HTTPS client in Java?

Thread view: 
Simon - 28 Nov 2007 19:25 GMT
Hello -

I'm trying to write a simple Java client program that tries to establish a
connection with a webserver over HTTPS. The webserver requires 2-way
authentication, ie. the server authenticates itself to the server and
vice-versa. I have a client certificate in the form of a P7B file. The
server certificate is self-signed. I want to keep the client program as
simple as possible, as it will be used to debug contentious communications
issues.

Is it possible to do this simply using the HttpsURLConnection class? It
seems to have no way to import a certificate on the fly. It seems to require
the use of other classes such as KeyStore, which adds complexity and reduces
clarity.

Can anyone offer advice?
Manish Pandit - 28 Nov 2007 22:16 GMT
> Hello -
>
[quoted text clipped - 12 lines]
>
> Can anyone offer advice?

I have not used 2-way auth over HTTPS, but for 1-way I found Apache's
HTTPClient (http://jakarta.apache.org/httpcomponents/httpclient-3.x/
sslguide.html) to work very well. It might be worth a look..as it
could very well support 2-way auth.

-cheers,
Manish


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.