Package net.i2p.crypto
Class DirKeyRing
java.lang.Object
net.i2p.crypto.DirKeyRing
- All Implemented Interfaces:
KeyRing
public 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, public since 0.9.28
-
Constructor Summary
Constructors Constructor Description DirKeyRing(File baseDir)
-
Method Summary
-
Constructor Details
-
Method Details
-
getKey
public PublicKey getKey(String keyName, String scope, SigType type) throws GeneralSecurityException, IOExceptionCert must be in the file (escaped keyName).crt, and have a CN == keyName. This DOES do a revocation check. CN check unsupported on Android.- Specified by:
getKey
in interfaceKeyRing
scope
- a domain identifier, indicating router update, reseed, etc.- Returns:
- null if file doesn't exist, throws on all other errors
- Throws:
GeneralSecurityException
IOException
-
setKey
Unimplemented, unused.
-