0

I get a 'No Peer Certificate' error when I run my android app:

08-25 18:09:11.212: D/Genexus-HTTP(23639): Request (GET) to https://system.funacc.com/gxmetadata/happyplus.android.json 08-25 18:09:11.342: E/Genexus-HTTP(23639): Error (javax.net.ssl.SSLPeerUnverifiedException) from https://system.funacc.com/gxmetadata/happyplus.android.json 08-25 18:09:11.342: E/Genexus-HTTP(23639): javax.net.ssl.SSLPeerUnverifiedException: No peer certificate 08-25 18:09:11.342: E/Genexus-HTTP(23639): at com.android.org.conscrypt.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:146) 08-25 18:09:11.342: E/Genexus-HTTP(23639): at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93) 08-25 18:09:11.342: E/Genexus-HTTP(23639): at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:388)

I've created my android app using GeneXus Do I need to configure anything on GeneXus to use https rest services?

Matt Clark
  • 27,671
  • 19
  • 68
  • 123
cimasan
  • 9
  • 1

1 Answers1

1

The most common reason to get this error is that the certificate is invalid or not a CA root validated certificate.

If you’re using a test/temporary certificate, this could be reason. If you think the certificate is valid please check if the server is returning the full certificate chain.

Please check related thread:

SSL certificate is not trusted - on mobile only

and

https://superuser.com/questions/347588/how-do-ssl-chains-work

Community
  • 1
  • 1
fpanizza
  • 1,589
  • 1
  • 8
  • 15
  • I would suggest adding this to this answer: If and only if you have no chance to use that services "as is", then add this to the MainApplication.java file: application.setAllowNotTrustedCertificate(true); – Armin Bachmann Aug 27 '15 at 17:04
  • Note that, in the case you set that flag in MainApplication.java, your app, and may be your app's users incur in major security risks. – Armin Bachmann Aug 27 '15 at 17:13
  • Great! something was wrong my certificate on server side. Thanks guys! – cimasan Aug 28 '15 at 04:27