Nickelgrass Active Member Licensed User Longtime User Sep 22, 2014 #1 Hi, I am using the PushExample to register the device on a webserver (HTTPS). I added the httputils2 as modules, unchecked the library and changed the hc.initialize to hc.initializeacceptall. So it should work. But I still get the same error: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate . What is going on here? What could still be wrong? Thanks!
Hi, I am using the PushExample to register the device on a webserver (HTTPS). I added the httputils2 as modules, unchecked the library and changed the hc.initialize to hc.initializeacceptall. So it should work. But I still get the same error: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate . What is going on here? What could still be wrong? Thanks!
Reviewnow Active Member Licensed User Longtime User Sep 22, 2014 #2 I am assuming that you connecting to a web service, the web service namespace has to equal your https assignment Example asmx webservice <WebService(Namespace:=https://yourdomain.com/yourservice)> _ <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _ this is assuming your are connecting windows webservice Upvote 0
I am assuming that you connecting to a web service, the web service namespace has to equal your https assignment Example asmx webservice <WebService(Namespace:=https://yourdomain.com/yourservice)> _ <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _ this is assuming your are connecting windows webservice
Erel B4X founder Staff member Licensed User Longtime User Sep 23, 2014 #3 Can you upload your project (File - Export as zip)? Upvote 0
Nickelgrass Active Member Licensed User Longtime User Sep 23, 2014 #4 Hi, thaks for the replies. I dont exactly know what you mean with namespace. I have a webserver and it has a htaccess to redirect all incoming to https. On this server there is a php skript to receive the registration and one to send a push notification. I have included them in the zip file. I assume the SenderID in the B4A code is the 12 digit google project id and the api key in the push.send.php is the very long google api key. Thanks! Attachments push.zip push.zip 12.4 KB · Views: 571 Last edited: Sep 23, 2014 Upvote 0
Hi, thaks for the replies. I dont exactly know what you mean with namespace. I have a webserver and it has a htaccess to redirect all incoming to https. On this server there is a php skript to receive the registration and one to send a push notification. I have included them in the zip file. I assume the SenderID in the B4A code is the 12 digit google project id and the api key in the push.send.php is the very long google api key. Thanks!
Erel B4X founder Staff member Licensed User Longtime User Sep 23, 2014 #5 Note that you should initialize hc in Service_Create not Service_Start. Though it is probably not related to this error. Is this server a public server? Can you post the full error message from the logs? Upvote 0
Note that you should initialize hc in Service_Create not Service_Start. Though it is probably not related to this error. Is this server a public server? Can you post the full error message from the logs?
Nickelgrass Active Member Licensed User Longtime User Sep 23, 2014 #6 Thanks for the reply! I am aware that the hc.initialize is in the wrong place. It was just to test that I put it there, I had it in the right place usually. This is the full error message from the log: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate . No more. The server is my own private webpage hosted by a normal commercial provider where I put the php scripts. I do not have a baught SLL certificate. Could that be the problem? The actual GCM registration works, I get a code and can send a notification if I manually update the id. Just that one request to the push.reg.php fails. Last edited: Sep 23, 2014 Upvote 0
Thanks for the reply! I am aware that the hc.initialize is in the wrong place. It was just to test that I put it there, I had it in the right place usually. This is the full error message from the log: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate . No more. The server is my own private webpage hosted by a normal commercial provider where I put the php scripts. I do not have a baught SLL certificate. Could that be the problem? The actual GCM registration works, I get a code and can send a notification if I manually update the id. Just that one request to the push.reg.php fails.
Erel B4X founder Staff member Licensed User Longtime User Sep 24, 2014 #7 InitializeAcceptAll should work with self signed certificates. Try to create a new project and use HttpClient to connect to this server. The same error will appear however I hope that the full error message will be logged this time. Upvote 0
InitializeAcceptAll should work with self signed certificates. Try to create a new project and use HttpClient to connect to this server. The same error will appear however I hope that the full error message will be logged this time.
Nickelgrass Active Member Licensed User Longtime User Sep 24, 2014 #8 I have done how you suggested. I rewrote it all to use the httpclient directly but I still get the same error and no other information (statuscode -1) javax.net.ssl.SSLPeerUnverifiedException: No peer certificate . I altered my htaccess and disabled the https rewriteengine and then it worked. So I suppose there is something wrong with the combination of my rewreiteengine and the httpclient. My htacces looks like this: Code: Copy RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Nothing fancy. Any suggestions what it could be? I tryed the links that I try to get with the initializeget and it works in the browser. My PHP script does not log any activity from the App. So the httpclient doesnt like something about the rewrite. Last edited: Sep 24, 2014 Upvote 0
I have done how you suggested. I rewrote it all to use the httpclient directly but I still get the same error and no other information (statuscode -1) javax.net.ssl.SSLPeerUnverifiedException: No peer certificate . I altered my htaccess and disabled the https rewriteengine and then it worked. So I suppose there is something wrong with the combination of my rewreiteengine and the httpclient. My htacces looks like this: Code: Copy RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Nothing fancy. Any suggestions what it could be? I tryed the links that I try to get with the initializeget and it works in the browser. My PHP script does not log any activity from the App. So the httpclient doesnt like something about the rewrite.
Erel B4X founder Staff member Licensed User Longtime User Sep 25, 2014 #9 The full error message should be printed in the unfiltered logs. It is worth checking it (though I'm not sure that it will shed more light about this issue). Upvote 0
The full error message should be printed in the unfiltered logs. It is worth checking it (though I'm not sure that it will shed more light about this issue).
Nickelgrass Active Member Licensed User Longtime User Sep 25, 2014 #10 Ok, I modified the code a little to only do a simple get to the server php without all the google stuff. Here is the code and the resulted log. It shows some W/System.err( nnn). Perhaps it may put some light in the case. Thanks a lot! Attachments push.zip push.zip 11.7 KB · Views: 538 Upvote 0
Ok, I modified the code a little to only do a simple get to the server php without all the google stuff. Here is the code and the resulted log. It shows some W/System.err( nnn). Perhaps it may put some light in the case. Thanks a lot!
Erel B4X founder Staff member Licensed User Longtime User Sep 26, 2014 #11 Your code looks correct. Is the server using TLS as the SSL protocol? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Sep 28, 2014 #13 Sorry but I do not know why it fails. If you can make this server accessible over the internet then I can try to further check it. Upvote 0
Sorry but I do not know why it fails. If you can make this server accessible over the internet then I can try to further check it.
Erel B4X founder Staff member Licensed User Longtime User Sep 28, 2014 #14 Http library is based on Android HttpClient API. This API doesn't support the SNI extension: http://en.wikipedia.org/wiki/Server_Name_Indication Upvote 0
Http library is based on Android HttpClient API. This API doesn't support the SNI extension: http://en.wikipedia.org/wiki/Server_Name_Indication
Nickelgrass Active Member Licensed User Longtime User Sep 28, 2014 #15 ok, thanks! then I will have to find a workaround. Upvote 0
Nickelgrass Active Member Licensed User Longtime User Nov 28, 2014 #16 Does anyone know if this will be available any time soon? I would desperatly need to access HTTPS on a SNI webserver. Upvote 0
Does anyone know if this will be available any time soon? I would desperatly need to access HTTPS on a SNI webserver.
DonManfred Expert Licensed User Longtime User Nov 28, 2014 #17 Nickelgrass said: Does anyone know if this will be available any time soon? Click to expand... You need to ask google whether they put this into his APIs; not Erel. Erel just can only use what google put into their APIs. Upvote 0
Nickelgrass said: Does anyone know if this will be available any time soon? Click to expand... You need to ask google whether they put this into his APIs; not Erel. Erel just can only use what google put into their APIs.
Nickelgrass Active Member Licensed User Longtime User Dec 15, 2014 #18 My question referred to anyone who knew anything about the google side. Upvote 0
Shay Well-Known Member Licensed User Longtime User Dec 26, 2014 #19 Hi I am having same issue (I think) I moved from http to https in my project and web site and I am getting this error: Error: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate I am using httputils2 library Job.PostString("http://www.something.com/Main.php", Query) I checked and the web site is using SNI We use SNI (Server Name Indication) which enables multiple websites to run on the same IP number. SNI is not supported by Internet Explorer on Windows XP meaning that the (very low number of) users running Internet Explorer on Windows XP will not be able to take advantage of SSL on your website. Click to expand... anything I can do? since my issue is that if I put sniffer I can see in clear text my request and response to the database and this is not good... Upvote 0
Hi I am having same issue (I think) I moved from http to https in my project and web site and I am getting this error: Error: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate I am using httputils2 library Job.PostString("http://www.something.com/Main.php", Query) I checked and the web site is using SNI We use SNI (Server Name Indication) which enables multiple websites to run on the same IP number. SNI is not supported by Internet Explorer on Windows XP meaning that the (very low number of) users running Internet Explorer on Windows XP will not be able to take advantage of SSL on your website. Click to expand... anything I can do? since my issue is that if I put sniffer I can see in clear text my request and response to the database and this is not good...
Erel B4X founder Staff member Licensed User Longtime User Dec 28, 2014 #20 HttpClient doesn't support the SNI extension. However did you modify the code to call hc.InitializeAcceptAll? Upvote 0
HttpClient doesn't support the SNI extension. However did you modify the code to call hc.InitializeAcceptAll?