net.i2p.crypto
Class DirKeyRing
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirKeyRing
public DirKeyRing(File baseDir)
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.