mdamaceno / rest-client

Automatically exported from code.google.com/p/rest-client
Apache License 2.0
0 stars 0 forks source link

Cannot perform rest calls to a server using a self-signed cerfiticate #143

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try to perform any rest calls to a server with a self signed certificate

What is the expected output? What do you see instead?
peer not authenticated
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
    at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:352)
    at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
    at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:397)
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:150)
    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:575)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
    at org.wiztools.restclient.HTTPClientRequestExecuter.execute(HTTPClientRequestExecuter.java:287)
    at org.wiztools.restclient.ui.RESTView$30.run(RESTView.java:1130)

What version of the product are you using? On what operating system?
WizTools.org RESTClient 2.4 on OSX

Please provide any additional information below.
If a server has a self signed certificate I cannot perform any tests.  I can 
work around this by installing the trust store file from that server, however, 
when I am attempting to test against multiple servers this is a terrible hassle 
as I have to continuously switch the trust store files around.  Web browsers 
have the ability to ignore the self signed certs and it would be great if 
WizTools could as well.

Original issue reported on code.google.com by wul...@gmail.com on 9 May 2012 at 5:02

GoogleCodeExporter commented 8 years ago
Hi did you try the hostname verifier option (screenshot attached)?

Original comment by subwiz on 10 May 2012 at 2:52

Attachments:

GoogleCodeExporter commented 8 years ago
Setting Hostname verifier to Allow All (or any other setting) has no effect on 
this issue.

Original comment by wul...@gmail.com on 10 May 2012 at 2:59

GoogleCodeExporter commented 8 years ago
Ok. Can you give me any internet site with self-signed certificate? I can run 
few tests on that using RESTClient.

Original comment by subwiz on 10 May 2012 at 3:08

GoogleCodeExporter commented 8 years ago
https://www.pcwebshop.co.uk/ is a sample self-signed cert site.

r579 and r580 has the fix.

Original comment by subwiz on 7 Jul 2012 at 9:12

Attachments: