Hi Shai
further debugging showed me that effectively there is an issue on server
side related to session management throwing an exception.
I was on the wrong way as I didn't apply any modification to the webservice
code , but migrated to Windows 10 and the customer too setupped a new
server few time ago and for that reason I had to make a modification to the
mobile application (when the plugin was updated) and from that time on I
started having the error ....
The coincidence of the two events had make me to get the wrong way .... now
everything is clear :)
Sorry for the inconvenience and that you again for your great support
Nicola
On Monday, August 14, 2017 at 6:32:22 PM UTC+2, Nicola Dell'Amico wrote:
>
> Hi,
> I have a couple of application running on Android.
> They access to different webservice hosted in Windows machine , and that
> woarked fine until the last Netbeans Codenameone plugin update.
> Now when I try to access the webservice specifying the address as http , I
> get a '500 Internal server error'
> I tried to install a self signed ssl certificate into the server and when
> when I try to access the webservice specifying the address as https I get
> the following exception :
> 'javax.net.ssl.SSLHandshakeException:
> java.security.cert.CertificateException: No subject alternative names
> present'
>
> I think It's a certificate issue.
>
> Both methods (http and https) work fine from Firefox and Chromium
> (manually trusting the certificate when using https).
>
> I tried some tips read from the net .
> I.e.
> added the build hint
> ios.plistinject=<key>NSAppTransportSecurity</key><dict><key>NSAllowsArbitraryLoads</key><true/></dict><key>CFBundleURLTypes</key>
>
> <array> <dict> <key>CFBundleURLName</key>
> <string>it.vtsystem.sigemmobile.SIGEMMobile</string> </dict> <dict>
> <key>CFBundleURLSchemes</key> <array> <string>SIGEMMobile</string> </array>
> </dict> </array>
>
> I tried some methods to disable the java check
> javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(
> new javax.net.ssl.HostnameVerifier() {
>
>
> public boolean verify(String hostname,
> javax.net.ssl.SSLSession sslSession) {
> return hostname.equals("localhost");
> }
> });
>
>
>
>
> and
>
> private static void disableSslVerification() {
> try {
> // Create a trust manager that does not validate certificate
> chains
> TrustManager[] trustAllCerts = new TrustManager[]{new
> X509TrustManager() {
> public java.security.cert.X509Certificate[]
> getAcceptedIssuers() {
> return null;
> }
>
>
> public void checkClientTrusted(X509Certificate[] certs,
> String authType) {
> }
>
>
> public void checkServerTrusted(X509Certificate[] certs,
> String authType) {
> }
> }
> };
>
>
> // Install the all-trusting trust manager
> SSLContext sc = SSLContext.getInstance("SSL");
> sc.init(null, trustAllCerts, new java.security.SecureRandom
> ());
> HttpsURLConnection.setDefaultSSLSocketFactory(sc.
> getSocketFactory());
>
>
> // Create all-trusting host name verifier
> HostnameVerifier allHostsValid = new HostnameVerifier() {
> public boolean verify(String hostname, SSLSession session)
> {
> return true;
> }
> };
>
>
> // Install the all-trusting host verifier
> HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid);
> } catch (NoSuchAlgorithmException e) {
> e.printStackTrace();
> } catch (KeyManagementException e) {
> e.printStackTrace();
> }
> }
>
>
> but I cannot compile any of the 2 with codenameone (not investigated too
> much ...)
>
> I should like to continue using http (I'm NOT concerned with IOS builds)
>
> Please give me back the last functioning plugin
> or let me know how to solve
>
> I have a customer pressing for a bug-fix and I cannot have a running
> application .... and I's holiday time too !!!!
> Please helpppppppp !!!!!!
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/01053277-a605-4b9a-a5b7-ffff80ce0ede%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.