File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Secure way to obtain host address

 
Nuno Miguel Santos
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1638
IntelliJ IDE Java MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you need to encrypt a hostname?
 
Pat Farrell
Rancher
Posts: 4660
5
Linux Mac OS X VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic