Restfulie HTTPS request throws "javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated"

84 views
Skip to first unread message

thiago.caiubi

unread,
Jul 20, 2011, 6:20:41 PM7/20/11
to restfulie
Hi guys,

I am trying to GET an URL through Restfulie but it throws
"javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated".

I was checking "br.com.caelum.restfulie.http.apache.ApacheDispatcher"
and noticed that DefaultHttpClient but anything is configured.

I wrote two blocks of code and its output.

The first one uses pure Restfulie implementation:

Java code: https://gist.github.com/1096040
Console log: https://gist.github.com/1096043

And the other one I wrote using Apache HttpClient and setting SSL
specifications to the request:

Java code: https://gist.github.com/1096047
Console log: https://gist.github.com/1096050

Is there any other way to make this request works without modifying
Restfulie? If you need any help with a Pull Request let me know!

Thanks,

Thiago Caiubi
thiago...@gmail.com

Guilherme Silveira

unread,
Jul 26, 2011, 12:53:33 PM7/26/11
to rest...@googlegroups.com
Hi Thiago!

Can you contribute with a patch that automatically adds a TrustManager as soon as he does: Restfulie.custom().trusting(manager)....

How do you think one could set up the trust algorithm in a apache independent way, any interface that generalizes apache's is great.

Regards

Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/
Reply all
Reply to author
Forward
0 new messages