SSLHandshakeException

Recently at work I have been having to use Java and HTTPS for a portlet project that we are working on. For obvious reasons, we want the portals to use HTTPS as a means of communication for private data to prevent people from being able to intercept the data.

A big problem that has caught a couple of us out has been how java manages the certificates and the SSL handshake. It took me ages to find out what the problem was, and many Google searches. Eventually I found out, and I am going to try and help other out there by saying how to get rid of this exception.

The problem I had was that the CA (Certificate Authority) certificate was missing from my java cacerts file. For those who dont know, the CA are companies which certify who the certificate holder is who they say they are. The idea being that you trust the CA, so therefore you trust the holder. To make sure that the certificate is valid, the client and server will use both certs to verify a connection.

Unlike browsers, which cleverly download the SA cert if it is not present to do the authentication, java needs the CA cert to be already installed in the cacerts truststore. Use the instructions below to install the CA certificate (on a windows PC).

  1. Save a copy of the CA certificate to your computer. I’ll let you work out how to do this.
  2. Open up a DOS command prompt.
  3. You now need to run the keytool program shipped with java. The syntax is
    keytool -import -trustcacerts -alias [name of CA]
        -file [path to the CA certificat you just saved]
        -keystore [path to the cacerts file]
  4. change the bits above in the [] to the correct paths. The ususal path for the cacerts is %JAVA_INSTALL_DIR%/jre/lib/security
  5. If you get prompted for a password, it is changeit

You will then need to restart your java app, and then hopefully it should work.

Oh, and on a different note, Google follow this please -> Therapy: Hair, Body, Nails

February 28th, 2007 | 1 Comment

Graph Games

Well, the game that I worked on over the summer called Graph games has finally gone public and can be found on the Channel 4 games chart.

Its aparently had 50,000 plays - giving the two lecturers enough data to hopefully write a paper on the subject of movement in graph understanding.

So if you are interested head over and look at what I contributed to here.

March 24th, 2006 | Leave a Comment

Weekend

The weekend is here and I have reached the end of my frist week as a cs intern. Its been emotional.

Anyway, the reason that I am writing this is cause I have discovered James Blunt and all I can say is WOW! I would really recommend this to anyone. I havent stopped listening to it for a week.

Also, DISNEY on monday. I cant wait to try out the new Space Mountain ride. Although the drive is going to be a bit tiring as it is so early in the morning. Watch this space to be kept informed.

June 18th, 2005 | 2 Comments

First Week

I know that I am only half way through my first week, but I thought that I would post a quick item here. Anyone who has visited this site will know that it has been in a state of dissarray recently as I try to make the blog fit more in with my main site design. Although I dont know why anyone is coming to this page as I havent really advertised the fact that I am doing this.

As for work, it’s tough. I have dived straight in at the deep end and I think that I am starting to get the hange of it. My main aim at the moment is to implement a scoring system for the GraphMotion project that I am working on as a summer intern for the Uni. I have a VERY basic system up and running, and I am pleased so far because it means that I must know more than I gove myself credit for. The project is a very complex system of abstract classes, threads all over the place, and lots of stuff being re-drawn all the time to provide the animation.

So, thats work, as for life in general I went to Bargain Tuesday at Cineworkd in Ashford to watch Mr. and Mrs. Smith, and I have to say that it was a very enjoyable film. If you want to go and watch people and things be blown up then I would recommend it to anyone (apart from youngsers).

June 15th, 2005 | Leave a Comment

Update

Well, I have been a busy bunny this week, I am working in the Kent IT Clinic getting a feel for it so I know what to expect next year. Kinda jumping in at the middle end, if there is such a thing. Only got the one week there though as I start my summer job on Monday.

I have somehow, don’t ask how, managed to get a job as a summer intern with the Computing Lab. I am helping develop their research into Graphs in Motion by writing java applets and a website for them. A little nervous about this as I havent really done anything like this before, but I am really looking forward to it.

I am sort of thinking that this blog will become a “My summer in Sun”, orat least my summer programming their language. You might get an insight into what I will be learning and doing. Alternatively, I may not do that.

Enough for today, more soon.

June 9th, 2005 | Leave a Comment

Powered by WordPress | Blue Weed by Blog Oh! Blog | Entries (RSS) and Comments (RSS).