Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.security > #127

Re: Accessing default .ke

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this>
Subject Re: Accessing default .ke
Message-ID <R5idnQOoyObGr-7VnZ2dnUVZ8h2dnZ2d@novis.pt> (permalink)
X-Comment-To comp.lang.java.security
Newsgroups comp.lang.java.security
In-Reply-To <a6a57413pb2u58mflvcce86amc3kv6tdd6@4ax.com>
References <a6a57413pb2u58mflvcce86amc3kv6tdd6@4ax.com>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 51
Date Wed, 27 Apr 2011 16:08:18 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303920498 96.60.20.240 (Wed, 27 Apr 2011 11:08:18 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 11:08:18 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.security:127

Show key headers only | View raw


  To: comp.lang.java.security
Roedy Green wrote:

> I currently have some code like this:
> 
>   /**
>      * where to find .keystore
>      */
>     private static final String KEYSTORE_FILENAME =
> "C:/users/roedy/.keystore";
> 
> 
> ....
> 
>     final KeyStore keystore = KeyStore.getInstance( "JKS" );
>         keystore.load( new FileInputStream( KEYSTORE_FILENAME ), null
> );
>         return ( PrivateKey ) keystore.getKey(
> RECEIVERS_PRIVATE_CERTIFICATE_ALIAS, PASSWORD );
> 
> 
> Is there a way to just get the default .keystore without having to
> guess where it is on disk?
> 

[1] says about user-level certificates:

>The default locations of the of the keystore files for Unix and Windows are as follows:
>
>Operating System        Location
>Unix                    ${user.home}/.java/deployment/security. 
>Windows                 ${deployment.user.home}\security

So you can access those through the system properties.

There's the location of system-wide certs just below in that document. I
hope this applies - the user.home would be one of the place to search,
definately, though.

[1]
<http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/jcp.html>
-- 
Sabine Dinis Blochberger

Op3racional
www.op3racional.eu

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.security | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Accessing default .keysto "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 16:08 +0000
  Re: Accessing default .ke "Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this> - 2011-04-27 16:08 +0000
    Re: Accessing default .ke "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 16:08 +0000
      Re: Accessing default .ke "Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this> - 2011-04-27 16:08 +0000

csiph-web