Questions tagged [httpsurlconnection]
329 questions
7
votes
3 answers
Is root certificate in the trust store enough to establish a connection?
Is having the root certificate in truststore enough for establishing the connection with a website? If so, just to test, I've imported the root certificate of google to new trust store which I have created and pointed to that trust store. Even then…

preetk
- 189
- 4
- 12
7
votes
1 answer
I/O error during system call, Broken pipe
I know this question was raised a lot, but i didn't find any solution.
I'm trying to upload big file using https but i'm getting exception " I/O error during system call, Broken pipe" same code works when i'm uploading it using http.
I read that…

Sharas
- 1,985
- 3
- 20
- 43
7
votes
1 answer
Android self signed certificate: Trust anchor for certification path not found
I know this subject is discussed in many places, but after I went through almost all of them, I have decided to create my first StackOverflow question...
The problem is the following:
I want to connect to a secured webservice (https) that use a…

TheOnlyYam
- 193
- 2
- 4
7
votes
0 answers
Getting SSL certificate details from URL Connection request
In android, I want to make a URL connection to a HTTPS URL. After the connection is opened I want to be able to read the certificate from the server and obtain the issued common name and organisation strings?
Is this possible? If so what is the best…

FlashAsh80
- 1,357
- 1
- 16
- 27
7
votes
1 answer
SSL Client authentication in Android 4.x
I would like to create an App which connects to a server. This server uses SSL Client Authentication. The User of the App should be able to choose the certificate and allow the use of it like it is implemented in the browser app.
In the browser app…

Michael Klenk
- 3,202
- 2
- 19
- 19
7
votes
2 answers
Decrypt client-side SSL traffic in Wireshark generated by Java HttpsURLConnection
I am trying to use a GUI Java program written by someone else that is not behaving as I would expect. In the course of the program's operations, it contacts a server to pull data down, but it's not displaying the correct data. I am trying to…

Bryce Thomas
- 10,479
- 26
- 77
- 126
6
votes
4 answers
how to use HttpsUrlConnection instead of DefaultHttpClient
DefaultHttpClient, ThreadSafeClientConnManager, HttpParams,HttpProtocolParams, SchemeRegistry, SSLSocketFactory, NameValuePair, HttpResponse are deprecated.
I tried to use HttpsUrlConnection but i confused about them.
protected Gson gson;
private…

Kaloglu
- 1,651
- 1
- 20
- 31
6
votes
1 answer
android - httpsurlconnection 'get' 405 - method not allowed
I am using a 'get' method on HttpsUrlConnection. When i am testing my code on eclipse (Windows) it works fine. When i compress it to a jar file and use it on android studio it gives me '405 - method not allowed'. What's mean, I am running the method…

Montoya
- 2,819
- 3
- 37
- 65
6
votes
1 answer
Get SSL Version used in HttpsURLConnection - Java
I am developing a java agent to monitor http communications happening in my application server. I like to know the SSL version(SSLv3, TLS, etc) used in outgoing Https connections. Is there a way to get the SSL version by any means?

Adhi
- 149
- 2
- 11
6
votes
4 answers
Android: java.lang.IllegalStateException: Already connected
I'm testing a sample of code but its always error at connection.setDoInput(true);
HttpsURLConnection connection = null;
DataOutputStream outputStream = null;
DataInputStream inputStream = null;
String urlServer =…

Saint Robson
- 5,475
- 18
- 71
- 118
6
votes
2 answers
Store cookie in sharedpreferences
I've been pulling my hair trying to figure this out: I'm making an HttpsURLConnection and using java.net.cookiemanager to manage my cookies (there's no way of using android.webkit.cookiemanager to HttpUrlConnection/HttpsUrlConnection as I have…

Thoast83
- 529
- 5
- 15
5
votes
1 answer
Server doesn't support Android 5.0's default cipher suite
After updating to android 5.0 lollipop, HttpsURLConnection occurs handshake error.
05-05 14:54:08.821 10855-11793/com.soonoo.mobilecampus E/INFO﹕ javax.net.ssl.SSLHandshakeException: Handshake failed
at…

soonoo
- 867
- 1
- 10
- 35
5
votes
0 answers
How to use StrictHostnameVerifier over HttpsURLConnection by API level 22 without deprecation?
This was the code I have used so far:
URL request = new URL(url);
HttpsURLConnection urlConnection = (HttpsURLConnection) request.openConnection();
urlConnection.setHostnameVerifier(new StrictHostnameVerifier());
However, by API Level 22…

guness
- 6,336
- 7
- 59
- 88
5
votes
0 answers
HttpsURLConnection setDoOutput(true) isn't working
So I am currently writing an android app that will get tweets from a particular user, using Twitter's 1.1 Application-only-auth, which requires a POST HTTP request to get a bearer token. I have a method set up that uses an HttpsURLConnection to open…

sarangj
- 300
- 2
- 10
5
votes
1 answer
HttpsUrlConnection: Trust anchor for certification path not found on 2.3
there. I need to establish https connection with https://free.temafon.ru but I've got CertPathValidatorException on Android 2.3 and below. What have I done.
Grab all certs from https://free.temafon.ru with Firefox.
Import certs in keystore in…

Bracadabra
- 3,609
- 3
- 26
- 46