[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Please send email if you are having login problems - see the posts below for more info.
Hotmail and Yahoo! users - please see the Hotmail post or the Yahoo! post for information on lost emails.
Using a self signed certificate with SSL  XML
Forum Index » How To Articles
Author Message
stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 751
Location: Superior, CO, USA
Offline

One problem people have with Java and SSL is that the certificate manager will reject any self signed certificates. This is common when you are doing development or are using an internal certificate that you don't want to pay money for from a commercial certificate authority.

One way to handle this is to simply accept any certificate, regardless of what it has in it. Below is a simple program to do just that - it reads a URL and, regardless of what the certificate says, prints out the contents of the URL. Note that this is a bit dangerous to use in a production environment so be careful.

I'll also attach a zip file with a build.xml so that you can build the program with ant.



Note that this is almost the exact same code I posted in a Devshed thread but the attachment has a complete build environment too.

 Filename selfsignedcert.zip [Disk] Download
 Description Simple build environment with the precompiled code too.
 Filesize 11 Kbytes
 Downloaded:  281 time(s)


Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
 
Forum Index » How To Articles
Go to:   
Powered by JForum 2.1.8 © JForum Team
This site built by Scott Dunbar of Xigole Systems. © 2005-2010 - Scott Dunbar
Java and the Java Get Powered logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
hotjoe.com and xigole.com have no affiliation with Sun Microsystems, Inc.