Android Question HTTPJOB can send STRINGPOST to IP SERVER with a HTTPS ?

scsjc

Well-Known Member
Licensed User
Longtime User
Hello everybody :)
I use the HTTPJOB library to send STRINGPOST to the server, with a domain name with HTTPS.
I would like to know if it is possible to send a STRINGPOST with IP and somehow HTTPS.

Thank you
 

DonManfred

Expert
Licensed User
Longtime User
Did you encounter any error? Where is the full errormessage?
What is the code you are using?

okHttpUtils2 is SURELY able to Post a String to a https Site.
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
Did you encounter any error? Where is the full errormessage?
What is the code you are using?

okHttpUtils2 is SURELY able to Post a String to a https Site.

No error, it works perfectly if I use an https:// with domain name.
I have also tried directing it to the IP directly and it also works fine for me.

What I mean is that I wanted to know if it is possible to use it to an IP directly through an SSL certificate (https).
I've been reading and I don't know if SSL over server IP can't be used.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
A SSL-Certificate is usually bound to an Hostname. Or even Wildcards to match *.hostname.tld

Did you try to create a Certificate for an IP-Address instead of a Hostname?

According to this answer, it is possible, but rarely used.

As for how to get it: I would tend to simply try and order one with the provider of your choice, and enter the IP address instead of a domain during the ordering process.
However, running a site on an IP address to avoid the DNS lookup sounds awfully like unnecessary micro-optimization to me. You will save a few milliseconds at best, and that is per visit, as DNS results are cached on multiple levels.

I don't think your idea makes sense from an optimization viewpoint.
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
A SSL-Certificate is usually bound to an Hostname. Or even Wildcards to match *.hostname.tld

Did you try to create a Certificate for an IP-Address instead of a Hostname?

Thanks for your answers ???

Yes, I already saw this article and I have not tried creating a certificate with IP, I suppose it can, so before I asked in the forum if someone has tried it.

Currently, in my app I use a Domain Name to make communications with HTTPJOB, and it works very well, except sometime when they update the DNS in some internet operator and it does not route to the correct IP.

I would like to know an alternative to be able to consume PHP page services on the server, using HTTPJOB or similar but with some type of encryption.
What would be the best way?
 
Upvote 0
Top