aspose file tools*
The moose likes Distributed Java and the fly likes Secure way to obtain host address Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Secure way to obtain host address" Watch "Secure way to obtain host address" New topic
Author

Secure way to obtain host address

Nuno Miguel Santos
Greenhorn

Joined: Nov 01, 2011
Posts: 10
I'm doing a simple RMI project that guarantees a secure communication between a server and client residing on different computers.

So, for communication, I thought of using RMISocketFactory, with an SSLSocket.

My problem resides in obtaining the host address, I don't want it hard-coded in my program.

What secure ways do I have for obtaining an host address?

Encrypt in a text file and read from it?

Regards, Nuno.
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

Why do you need to encrypt a hostname?


apigee, a better way to API!
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

By definition, on the whole internet, host names are public. That is what DNS (dynamic name service or distributed name service) is all about.

If you want to connect to www.google.com, its public. Period.

I would strongly recommend that you do not use RMI for this project. Use HTTP or if you really need security, use HTTPS
See
http://www.coderanch.com/t/570237/java/java/Why-there-still-interest-lots
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Secure way to obtain host address