• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Secure way to obtain host address

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you need to encrypt a hostname?
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
https://coderanch.com/t/570237/java/java/Why-there-still-interest-lots
reply
    Bookmark Topic Watch Topic
  • New Topic