Meaningless Drivel is fun!*
The moose likes Security and the fly likes javax.net.ssl.trustStorePassword with encrypted password? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "javax.net.ssl.trustStorePassword with encrypted password?" Watch "javax.net.ssl.trustStorePassword with encrypted password?" New topic
Author

javax.net.ssl.trustStorePassword with encrypted password?

Stefan Renemeister
Greenhorn

Joined: Sep 26, 2009
Posts: 13
I've set a truststore and it's password as a system property for my (IBM) JVM. Yes, WebSphere indeed.
Unfortunately, I haven't seen ways of setting my password encrypted. As all system props, their definition (and values!) show when dumping process output, exposing my password in plain text.
I don't like that. I'm sure I'm not the only one.
Can anyone enlighten me how I can set my password encrypted?

Current systemprops:
javax.net.ssl.trustStore=/location/of/truststore.jks
javax.net.ssl.trustStorePassword=password

Thank you in advance!
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1378
You need to store it in secure place and retrieve / Write some encryption/decryption algorithm to store and retrieve..
Stefan Renemeister
Greenhorn

Joined: Sep 26, 2009
Posts: 13
I know, but unfortunately that's not possible right now (requires application modification, which is in the current phase of the project not applicable).
I really look for a way to avoid displaying the truststore password in plain text. Anyone?
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1067
    
  10

I think I must be missing something. Assuming that one could encrypt the password then for it to be usable within the program the encryption key would need to be available to your program to decrypt the password so to be secure the encryption key would itself need to be encrypted! Of course this recursive encryption requirement extends to infinity.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.net.ssl.trustStorePassword with encrypted password?