Skip to content
wade.one

wade.one

wade womersley – york based software engineer

  • Home
  • 2011
  • March
  • 4
  • Using SSL in RestClient

Using SSL in RestClient

Posted on March 4, 2011September 4, 2012 By Wade 9 Comments on Using SSL in RestClient
Programming, Support

UPDATE 14/07/2012: The author of the client has released version 2.5 a short while ago and also a video for using self-signed certificates in the client.

RESTClient is a great little CLI and GUI tool for testing your REST API. I recently pushed a new API up in the office and it runs over SSL. I tried to test it in the RESTClient and got a PeerNotVerified error from Java. First thing I did was go to the SSL tab in RestClient presuming I could tell it to just trust the API…apparently not.

So after a bit of web scouring about how to get Java to trust your site I came across instructions and thought I’d re-post here simplified for anyone who needs to query HTTPS from RESTClient.

These instructions are based on Windows 64-bit and Java being installed into C:Program Files (x86)Java. So you may have to change a few paths but the core things are the same.

Navigate to the website in your browser, click the SSL icon in the address bar and click Certificate Information or Details etc.In the window that pops up, go to the Details tab then click the “Copy to File” button. Click Next until you get to the request for a Filename. Click Browse and navigate to “C:Program Files (x86)Javajre6libsecurity”. Enter the filename to save the certificate as (I suggest the domain name with .cer ending). Finally click Next and Finish.

Now open up a command prompt (if you’ve got Windows security then be sure to run as administrator [right click the shortcut to the command prompt and the option is there]) and enter the following:

cd "C:\Program Files (x86)\Java\jre6"
bin\keytool.exe -noprompt -import -keystore libsecuritycacerts
     -alias (put_domain_name_here)
     -file libsecurity(name_of_certificate_you_saved_above).cer

The second command should all be on one line. You’ll get asked for a password, if you’ve never touched any Java passwords on your machine before, it’ll probably be the certificate store default which is either changeit or changeme.

That’s it! You should now be able to query your service using HTTPS without any errors.

Share:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Reddit (Opens in new window) Reddit

Related

Comments

comments

Post navigation

❮ Previous Post: Glee does Rocky Horror!
Next Post: Hidden Camera Prank – Little Girl scares people! ❯

You may also like

Programming
#PHPUK2010 Part 1
February 26, 2010
Programming
Using Amazon EC2 with C# .net
October 15, 2012
Programming
Regex-fu #PHPUK2010
February 26, 2010
Hardware
Superb VPS (Virtual Private Server) Provider – VPS.net Review
November 18, 2009

9 thoughts on “Using SSL in RestClient”

  1. sriram says:
    July 5, 2011 at 14:41

    Hi,

    Can you provide me the how to implement security at REST webservices?

    Thanks & Regards,
    Sriram.

    Log in to Reply
  2. Wade says:
    July 9, 2011 at 11:50

    @sriram
    What is it you’re looking for exactly?

    Log in to Reply
  3. Gad Hazum says:
    October 13, 2011 at 20:18

    Tried your steps and still getting the same error (PeerNotVerified). Are there additional steps needed when it’s a two-way SSL? We are using client certificate to authenticate so the certificates need to be passed along with the request to the server.

    Log in to Reply
    1. Wade says:
      March 5, 2012 at 20:32

      Sorry for not replying, don’t get notices. I’ve not done two way sorry!

      Log in to Reply
  4. ozias ferreira says:
    December 5, 2011 at 18:08

    ola, eu Achei bom! mas ! quero mais informaçâo!!

    Log in to Reply
  5. Srinath says:
    June 25, 2012 at 05:15

    Hi Wade,
    I have a requirement that uses pkcs client cert. I was not able to get the client to accept the certificate. Is there any plans in future to support pkcs certificates?

    Log in to Reply
    1. Wade says:
      June 25, 2012 at 07:13

      Hello Srinath

      I didn’t write the client so I have no idea on future plans. Since writing this I’ve released my own Windows rest client with no SSL issues: http://xcitestudios.com/best-of-the-rest/

      Log in to Reply
  6. Subhash Chandran says:
    July 8, 2012 at 16:37

    Disclaimer: I am the owner of WizTools.org RESTClient featured in this blog.

    I released version 2.5 today with improved support for SSL (self-signed certificate and TLS two way authentication). A quick video is also available:

    Log in to Reply
  7. Dribble Online Limited - Hosting says:
    May 10, 2013 at 18:05

    I’ve been exploring for a bit for any high-quality articles or blog posts on this sort of area . Exploring in Yahoo I at last stumbled upon this site. Studying this info So i am glad to exhibit that I’ve a very good uncanny feeling I discovered exactly what I needed. I most certainly will make sure to do not omit this website and give it a glance regularly.

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • AI
  • artificial intelligence
  • Ego-centric
  • Events
  • Films
  • Food
  • Gaming
  • Gym
  • Hardware
  • Holidays
  • News
  • PHP
  • Programming
  • Random Stuff
  • Reviews
  • Science
  • SEO
  • Software
  • Software Engineer
  • Support
  • Uncategorized
  • Work

Copyright © 2025 wade.one.

Theme: Oceanly News Dark by ScriptsTown