# SSL issue : javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

**URL:** <https://forum.dimagi.com/t/ssl-issue-javax-net-ssl-sslpeerunverifiedexception-peer-not-authenticated/1939>\
**Category:** Developers\
**Created:** [October 15, 2014, 6:02pm UTC](https://forum.dimagi.com/t/ssl-issue-javax-net-ssl-sslpeerunverifiedexception-peer-not-authenticated/1939 "2014-10-15T18:02:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diokey\_Olivier](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/d/e19b73/32.png) [@Diokey\_Olivier](https://forum.dimagi.com/u/Diokey_Olivier)\
**Post date:** [October 15, 2014, 6:02pm UTC](https://forum.dimagi.com/t/ssl-issue-javax-net-ssl-sslpeerunverifiedexception-peer-not-authenticated/1939/1 "2014-10-15T18:02:12Z")

</div>

We are using apache HttpClient library to access commcare API and retrieve  
that.

It works fine on my local machine, but when we moved the application on the  
server, the application is throwing an exception.

javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

Is commcare using a self signed certificate ?

Any idea what this might be? Is it a setting on the server that we need to  
change? The code runs correctly on my machine.

Thank you.

---

<div class="post-metadata">

**Author:** ![Simon\_Kelly](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/simon_kelly/32/494_2.png) [@Simon\_Kelly](https://forum.dimagi.com/u/Simon_Kelly)\
**Post date:** [October 16, 2014, 8:40am UTC](https://forum.dimagi.com/t/ssl-issue-javax-net-ssl-sslpeerunverifiedexception-peer-not-authenticated/1939/2 "2014-10-16T08:40:34Z")

</div>

Hi Diokey

We are using a Thawte certificate so you shouldn't have any issues. What  
version of Java are you running on your local machine vs your server? Some  
users [https://github.com/rschreijer/lutung/issues/16#issuecomment-28672337](https://github.com/rschreijer/lutung/issues/16#issuecomment-28672337)  
have reported that upgrading to Java 7 has fixed this issue.

Another user [http://stackoverflow.com/a/23508599](http://stackoverflow.com/a/23508599) also reported that they  
had 2 different bouncy castles provider JARs in the classpath. Both drawn  
in by two different dependencies and that removing the older version fixed  
the issue for them.

> **···**
>
> On 15 October 2014 20:02, Diokey Olivier wrote:
> 
> > We are using apache HttpClient library to access commcare API and  
> > retrieve that.
> > 
> > It works fine on my local machine, but when we moved the application on  
> > the server, the application is throwing an exception.
> > 
> > javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
> > 
> > Is commcare using a self signed certificate ?
> > 
> > Any idea what this might be? Is it a setting on the server that we need to  
> > change? The code runs correctly on my machine.
> > 
> > Thank you.
> > 
> > --
> > 
> > * * *
> > 
> > You received this message because you are subscribed to the Google Groups  
> > "CommCare Developers" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [commcare-developers+unsubscribe@googlegroups.com](mailto:commcare-developers+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Simon Kelly  
> Senior Engineer | Dimagi South Africa

---

<div class="post-metadata">

**Author:** ![Diokey\_Olivier](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/d/e19b73/32.png) [@Diokey\_Olivier](https://forum.dimagi.com/u/Diokey_Olivier)\
**Post date:** [October 16, 2014, 1:46pm UTC](https://forum.dimagi.com/t/ssl-issue-javax-net-ssl-sslpeerunverifiedexception-peer-not-authenticated/1939/3 "2014-10-16T13:46:09Z")

</div>

Hi Skelly,

Thanks for your answer. we are using java 6 (on my local computer and the  
server). I will try the suggested solutions and see what happens.

Thank you.

> **···**
>
> On Thursday, October 16, 2014 4:40:55 AM UTC-4, skelly wrote: \> \> Hi Diokey \> \> We are using a Thawte certificate so you shouldn't have any issues. What \> version of Java are you running on your local machine vs your server? Some \> users \> \> have reported that upgrading to Java 7 has fixed this issue. \> \> Another user also reported that \> they had 2 different bouncy castles provider JARs in the classpath. Both \> drawn in by two different dependencies and that removing the older version \> fixed the issue for them. \> \> On 15 October 2014 20:02, Diokey Olivier \<diokey...@gmail.com \> wrote: \> \>\> We are using apache HttpClient library to access commcare API and \>\> retrieve that. \>\> \>\> It works fine on my local machine, but when we moved the application on \>\> the server, the application is throwing an exception. \>\> \>\> javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated \>\> \>\> Is commcare using a self signed certificate ? \>\> \>\> Any idea what this might be? Is it a setting on the server that we need \>\> to change? The code runs correctly on my machine. \>\> \>\> Thank you. \>\> \>\> -- \>\> \>\> --- \>\> You received this message because you are subscribed to the Google Groups \>\> "CommCare Developers" group. \>\> To unsubscribe from this group and stop receiving emails from it, send an \>\> email to commcare-developers+unsubscribe@googlegroups.com . \>\> For more options, visit https://groups.google.com/d/optout. \>\> \> \> \> \> -- \> Simon Kelly \> Senior Engineer | Dimagi South Africa \>
