Android : Trouble Making Https Connection To Server - With Password Authentication
Oct 11, 2009I'm having trouble making https connection to the server , with password authentication. What is the simplest & recommended way to do it ?
View 4 RepliesI'm having trouble making https connection to the server , with password authentication. What is the simplest & recommended way to do it ?
View 4 RepliesI want to connect to a server using ssl/https connection. During handshake between client and the server, I want to have server certificate authentication as well as client certificate authentication. The server certificate authentication is successful. But I don't know how to send client certificate to server for authentication, during the handshake.
View 4 Replies View RelatedI have Android pet-project DroidIn which utilizes HttpClient 4 (built into Android) to do some form based authentication. I started noticing that people who are using WiFi are reporting connection problems. It also doesn't help that site I'm accessing has self-assigned certificate. Well - the question is (I'm quite vague on WiFi details) If WiFi at the hotspot doesn't support HTTPS would that be a good enough reason for connection to fail and is there anything that I can do beside proxying into another appserver using HTTP which then would call HTTPS site?
View 2 Replies View RelatedI am doing a https post and I'm getting an exception of ssl exception Not trusted server certificate. If i do normal http it is working perfectly fine. Do I have to accept the server certificate somehow?
View 7 Replies View RelatedI'm creating an app for the Android platform which will connect with just one site using HTTPS. It is essential that it won't be able to connect to any other sites, even with valid SSL certificates. I want it to be resistant to every form redirection (for example to site pretending to be the one I need to connect with) or other "attacks". Unfortunately I cannot find any good tutorial about SSL in Android.Do you know any? I'd be grateful for some links or advices. Or maybe could you give me some code snippets? My app is prepared to use HttpURLConnection or HttpClient - it makes no difference which path will I choose.
View 2 Replies View RelatedI'm using ksoap over https to request data from a server. It works fine, but only every other time! Looking at the traffic with wire shark it seems that on every other request something goes wrong with the ssl traffic/handshake (data doesn't even get sent except for an fc-fault coming back). Doing the same requests using curl the server always responds fine and afaik the iPhone version of the program also doesn't seem to have any problems with the server.
View 13 Replies View RelatedI am trying to send an email to a specific address by using my own email. So far, I know that I can use android.content.Intent.ACTION_SEND to send an email. For instance:
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text"); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"blabla@gmail.com"});
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Log-in Sucessful");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Hi");
Activity context = null; context.startActivity(Intent.createChooser(emailIntent, "Send mail..."));
However, I do not know whether ACTION_SEND can accept username and password as well. This username and password basically will be used to authenticate the email sender. It's just like when you need to log-in into your gmail account before you can compose and send an email to someone.
So I have the following code.
StringBuilder sb = new StringBuilder(4096);
while (true) { int i = in.read(); if (i == 0) break;
else if (i == -1) throw new EOFException();
sb.append((char)i); }
What I see (with thousands of times run) is that this code takes about 1ms for every 7-10 bytes read. So reading just 10k takes almost a second!
I just ran across the 'PAW Server' app and it's pretty neat so far. I don't want to use it with http though, so I enabled https and restarted the app. It doesn't work at all now. I enabled bluetooth so I could manually update the config file on the sdcard and restart the server in http mode. It instantly started working again. I've tried a couple of different ports but can't get the https mode to work at all. The docs say that it will be slower which is understandable, but since it's not working at all I have to assume that I'm doing something wrong and missing something obvious. Anyone else using the PAW Server app with https enabled?
View 3 Replies View RelatedDetail Descriptioin: 1. When I use the same code to access "http://www.google.com", it works. 2. When I use the same code to access "https://www.google.com", it doesn't work and will throw IllegalArgumentException..............
View 2 Replies View RelatedI'm working on an Android app that requires both client and server certificate authentication. I have an SSLClient class that I created that works beautifully on regular desktop Java SE 6. I've moved it into my Android project and I'm getting the following error: "KeyStore JKS implementation not found".I've looked online a bit and it looks like there's a possibility that Java Keystores are not supported on Android (awesome!) but I have a feeling there's more to it than that because none of the sample code I've found resembles what I'm trying to do at all. Everything I found talks about using an http client rather than raw SSL sockets. I need SSL sockets for this application.
View 1 Replies View RelatedI have recently written a socket server in PHP that will be handling communication between an Android phone application and my PHP webserver. Due to the fact that Android doesn't natively support push style notifications we are going to be using our webserver as the middleware layer to handle our 'pushes'. The socket server is stable, runs well, and seems to scale nicely. While I would eventually like to re-write this in C I don't have the skill necessary to do that right now so I am going to be staying in PHP for at least a short while. As of this moment our Android emulator is able to communicate through the server, get pushes, etc. so that part is all covered.
My concern is that, right now, anyone can open a socket to my server and will be given a client connection. While we won't be passing sensitive data back and forth I don't want to allow just anyone to connect over and receive broadcast information, eat up my resources, and clog my server in general. The question is, how do I secure a server like this? Let's assume that I am running on port 25,000--can I set up some sort of SSL layer on that port and expect devices like the Android to be able to communicate over that port without any special protocols or jumping through hoops? I have considered asking the connecting clients to authenticate their user against our user database before being given a client connection, but that would require the passing of credentials in plain text over the network which I am not about to do.
I am rather new to straight TCP communication from PHP and feel like I might just be missing something simple that allows for authentication on this level.
Additional information: If I am able to get a valid username and password securely I would be using MySQL to validate the user and then accept/reject their connection based on the results of the query.
I am using the standard gmail app that comes with the motorola droid. However password authentication is only required the first time the application is launched. This means anyone who picks up your phone can see your email with one touch. Is there a way to require password authentication each time the application is launched?
View 5 Replies View RelatedI have looked into various posts about how to retrieve something via HTTPS on Android, from a server that uses a self-signed certificate. However, none of them seem to work - they all fail to remove the "javax.net.ssl.SSLException: Not trusted server certificate" message. It is not an option to modify the server to have a trusted certificate, and it is also not an option to make the server certificate match the server's IP address. Note, that the server will not have a DNS name, it will only have an IP-address. The GET request looks something like this:
I am fully aware that this solution is prone to man-in-the-middle attacks etc. So, the solution must ignore the lack of trust in the certificate, and ignore the hostname mismatch. Does anybody know the code, that does this, using Java for Android? There are plenty of attempts to explain this on stackoverflow.com, and plenty of code snippets, but they don't seem to work, and nobody has provided one block of code that solves this, as far as I can see. It would be interesting to know if somebody really solved this, or if Android simply blocks certificates that are not trusted.
Anyone else experiencing this problem or know of a solution? I have a Digicert signed https certificate that is throwing an SSLException (Not trusted server certificate). This doesn't make any sense as Digicert is a recognized certificate authority. I can connect to my https url without a problem via IE, Firefox, and Safari so they appear to have no issue with the certificate. Here's the code I'm using. Very simple stuff......................
View 3 Replies View RelatedI have a problem of ssl exception when i upload data to a https server. It uploaded the data to the server correctly but when i get the response after uploading it throws an exception of ssl certificate is not trusted. I'm using the SAX parser for parsing xml file and i am using httppost method().
View 1 Replies View RelatedIn the past I have used Python for backend stuff along with Django for frontend stuff, but I don't know how well those two work with Android. Can anyone recommend a good way to go about making server-side software that works well with Android? Please take into account that I also want a web application as a frontend, so the backend should work with both the web app and the Android app.
View 1 Replies View RelatedAm I the only one who has trouble with PDaNet Free Edition losing connection about every 20 to 30 minutes?
View 2 Replies View RelatedI don't want my app to crash if the user doesn't have wifi or 3g connectivity. How can I catch this at runtime in my app?
View 1 Replies View RelatedFor the past few days now when I make a call it has a delay in making the connection, like 10 seconds, never had this issue before, the only program I have installed lately was the GPS for golf and of course the latest updates on the existing programs I have. I have rebooted many times since and still have the issue.
View 1 Replies View RelatedI am trying to connect remote ms sql server 2005 and tried something but I could'nt. Does any of you know to connect sql server? I searched and I realize that Driver must be loaded.
View 3 Replies View RelatedAny way to use the Droid to make calls over WiFi as opposed to the VZW network? I have terrible coverage at my house, and would like to just use my WiFi connection. I would need to be able to go over WiFi but still be considered a Verizon Wireless call, as I call a lot of people with Verizon and take advantage of the free calling to Verizon customers. I don't see why Verizon wouldn't take advantage of something like this, it would only take strain off of their network if some users are connecting on their WiFi networks.
View 15 Replies View RelatedI am very new to Android. I need to make a connection with an UDP server by using my Android UDP client. Now I need to know how to work with UDP in Android?
View 2 Replies View RelatedI have been trying to setup a Droid to Droid 3G connection. I can confirm that all works great in wifi mode. The Droid can make connection requests (Http, Telnet, raw sockets) in 3G, but I cannot get the Droid to accept a socket connection in 3G mode. I was told by Verizon that a special license may be needed to accept socket connection requests and they would send me some information. So far none has been received. If anyone knows how to program the Droid to accept socket connection requests over 3G, please respond. Also if anyone knows why this not allowed please respond.
View 10 Replies View RelatedI want to create a browser to view as an administration.My project is about ferry booking using an android phone. The application is connected to the server. The ferry timing and other info are retrieved via server connection. The database is currently in Microsoft Access.My question is how do I create a browser to view data (e.g view users, delete users, create notification etc etc)? I want to create so called a 'website' that have access to the same database as the android application. Do I use Microsoft Visual Studio? How am I suppose to create a connection to Microsoft Access so that I can edit the database appropriately?
View 1 Replies View RelatedHow can i connect to the server in Android . Give me Some code it will really helpful for me .
View 1 Replies View RelatedI wrote this:
HttpsURLConnection con = (HttpsURLConnection) new URL ("Here my server URL is provided")
openConnection(); con.setDoOutput(true); con.setDoInput(true); con.connect();//
At this point I am getting error saying Java.net.SocketException:permission denied..
Actually I am sending request to server after getting request in XML format I want parse using
xr.parse(new InputSource("URL"));
But its giving error at con.connect(); only. And I have added Internet permission in manifest file.
test my app with an android device that is using a corporate calendar.... alternatively, can you tell me how to set up a mock corporate exchange server connection (and thus corporate calendar) on the emulator?
View 4 Replies View RelatedI'm trying to open tcp connection between android (emulator) and PC. I'm trying to create a new socket and then it crash. the line where it crash: Socket s = new Socket("10.0.2.2", 27015);
View 2 Replies View Relatedi am new to android and need simple http connection codes for client server(local server in the network) communication in android application.the connection starts when the application is started and if there is any update in the server it should be notified on the client and the server response must be based on the client request.
View 1 Replies View Related