Search code examples
certificatecodenameoneself-signed

Trust self-signed certificate in ConnectionRequest of codenameone


My mobile app needs to connect to a server with self-signed certificate only. Is it possible to do this? Because the app is built using codenameone, there are many Java classes missing and thus I can't use normal Java solution.

The app needs to be run in both iOS and Android.

Thanks for any suggestions.


Solution

  • At this time this isn't supported since Codename One uses the native connection API's on the various platforms (e.g. NSUrl on iOS so this can't be implemented there.

    In fact Apple recently limited the ability to access non-https URLs so even if this was added it might trigger an issue with Apple's future policies.

    Since valid certificates can be purchased for 5USD the motivation in using self signed certificates is much lower than it used to be in the past.