net.i2p.crypto
Class DirKeyRing

java.lang.Object
  extended by net.i2p.crypto.DirKeyRing
All Implemented Interfaces:
KeyRing

 class DirKeyRing
extends Object
implements KeyRing

Simple storage of each cert in a separate file in a directory. Limited sanitization of filenames.

Since:
0.9.9

Constructor Summary
DirKeyRing(File baseDir)
           
 
Method Summary
 PublicKey getKey(String keyName, String scope, SigType type)
          Cert must be in the file (escaped keyName).crt, and have a CN == keyName.
 void setKey(String keyName, String scope, PublicKey key)
          Unimplemented, unused.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirKeyRing

public DirKeyRing(File baseDir)
Method Detail

getKey

public PublicKey getKey(String keyName,
                        String scope,
                        SigType type)
                 throws GeneralSecurityException,
                        IOException
Cert must be in the file (escaped keyName).crt, and have a CN == keyName. CN check unsupported on Android.

Specified by:
getKey in interface KeyRing
scope - a domain identifier, indicating router update, reseed, etc.
Returns:
null if none
Throws:
GeneralSecurityException
IOException

setKey

public void setKey(String keyName,
                   String scope,
                   PublicKey key)
Unimplemented, unused.

Specified by:
setKey in interface KeyRing
scope - a domain identifier, indicating router update, reseed, etc.