My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 37: Support for ssl
2 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----
Type-Defect
Priority-Medium
3.0


Sign in to add a comment
 
Reported by cyrille.puget, Feb 26, 2008

Is the support for ssl connections already planned? This would be very
useful when connection to https REST services.

 
Comment 1 by subwiz, Feb 27, 2008
I believe it is supported in the underlying HTTP library used by RESTClient. Can you
test it out?
Comment 2 by subwiz, Feb 28, 2008
I tried connecting to https://dev.java.net/ .
It works:

http://flickr.com/photos/subwiz/2297501725/

And I discovered a little secret too: dev.java.net is hosted using JBoss, not using
Glassfish :O !
Comment 3 by subwiz, Feb 29, 2008
Marking the issue Invalid as the feature already exists.
Status: Invalid
Comment 4 by cyrille.puget, Mar 05, 2008

Yes, that's ok when you only have a server certificate. But it does not work if i
need to authenticate myself with a certificate: i need to be able to specify a
keystore. This is the same kind of feature that is available under SOAPUI.
Comment 5 by subwiz, Mar 05, 2008
Makes sense...

I will look into it.
Status: Accepted
Comment 6 by subwiz, Mar 05, 2008
I downloaded SoapUI 2.0.2. The requested feature is available in the menu:

File>Preferences>SSL Settings
Comment 7 by subwiz, Mar 05, 2008
A simple and fast to learn tutorial on Java's support for SSL. Will need this for
fixing the issue:

http://tvilda.stilius.net/java/java_ssl.php
Comment 8 by subwiz, Mar 05, 2008
Some other details:

http://hc.apache.org/httpclient-3.x/sslguide.html
http://www.jdocs.com/httpclient/3.0.1/api-index.html?m=class&p=org.apache.commons.httpclient.contrib.ssl&c=AuthSSLProtocolSocketFactory&render=classic


Comment 9 by subwiz, Mar 08, 2008
(No comment was entered for this change.)
Labels: 3.0
Comment 10 by subwiz, Mar 17, 2008
We should take Option input for:

1. truststore file
2. truststore password
3. keystore file
4. keystore password

These seem to be the input expected by the API. Is this correct @cyrille.puget?


Comment 11 by cyrille.puget, Apr 04, 2008
Yes, this is how it should be done.
In SOAPUI, they might have taken a shorcut since no trustore is required. The might
do truststore = keystore internally.
Comment 12 by subwiz, Apr 09, 2008
Thanks for the detail. I will incorporate this feature in the next release.
Comment 13 by subwiz, Jul 25, 2008
Revision 225: Http library changed to:

http://hc.apache.org/httpcomponents-client/

This has a neater implementation of SSL. SSL example for this API:

http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/examples/org/apache/http/examples/client/ClientCustomSSL.java
Comment 14 by subwiz, Jul 25, 2008
Rev. 226 has a basic implementation. Yet to do the file save part, browse button for
selecting the truststore file.
Comment 15 by subwiz, Jul 27, 2008
The binary with SSL support is available for download from here:

http://wiztools.org/project/RESTClient/restclient-3.0-SNAPSHOT-jar-with-dependencies.jar

@cyrille.puget, can you test this and tell me if it satisfies your requirement?
Comment 16 by subwiz, Aug 05, 2008
Closing the issue on the assumption that it works!
Status: Fixed
Comment 17 by somayajulu.vadapalli, Dec 22, 2008
Hi ... I just started using REST Client 2.2

When am using 2-WAY SSL...it's not working...am getting peer not authenticated 
exception.

When am using 1-way SSL ...am getting "not able to verify hostname" error.

Is there any "Ignore Hostname Verification" feature.

Pls tell me the correct procedure, if i have done anything wrong. 
Comment 18 by subwiz, Dec 23, 2008
Thanks for pointing it out. I just found this in http client library (which is used
by RESTClient):

http://hc.apache.org/httpcomponents-client/httpclient/apidocs/org/apache/http/conn/ssl/AllowAllHostnameVerifier.html

So I will incorporate this in next release. I have re-opened the issue too.
Status: Accepted
Comment 19 by somayajulu.vadapalli, Dec 23, 2008
Thanks...

Also, try to include the 2-way SSL feature as well.

By the way, when can we expect the next release? 
Comment 20 by subwiz, Dec 23, 2008
Rev. 351 has the fix for Ignoring Hostname Verification.

I have used 2-way-SSL in RESTClient with success recently. Please check with Rev.351
and verify if it works.

Rev.351 build is available here:
http://wiztools.org/project/RESTClient/restclient-2.3-SNAPSHOT-jar-with-dependencies.jar

A particular date for next release is not yet planned. But I think before end of Jan
2009 it should be released.
Comment 21 by somayajulu.vadapalli, Dec 30, 2008
Thanks for the info...

Able to download restclient-2.3 and tested it against 1-way SSL.
It works fine.

But it fails when tried against 2-way SSL.
Attached the screen-shot of the error.

Could i request subwiz user to pls explain me the scenario against which he could 
succeed with 2-way SSL.

Pls go thru the error and let me know if i did any wrong/ give me the solution.

Thanks and wish you a Happy New Year
RESTClient-2WaySSl_Error.doc
152 KB   Download
Comment 22 by subwiz, Jan 02, 2009
Thanks for sending in the details. I am looking into it...
Comment 23 by somayajulu.vadapalli, Jun 01, 2009
Any update on 2-way SSL feature?
Comment 24 by subwiz, Jun 03, 2009
2-way SSL is working for me. Can you try again? Can you verify if your configuration 
is correct?
Sign in to add a comment

Hosted by Google Code