dummy DSA (for sim - dont run on live net)

This commit is contained in:
jrandom
2004-06-22 04:23:19 +00:00
committed by zzz
parent 55e780d885
commit 5c3e815757
2 changed files with 36 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ import net.i2p.client.naming.NamingService;
import net.i2p.crypto.AESEngine;
import net.i2p.crypto.CryptixAESEngine;
import net.i2p.crypto.DSAEngine;
import net.i2p.crypto.DummyDSAEngine;
import net.i2p.crypto.DummyElGamalEngine;
import net.i2p.crypto.ElGamalAESEngine;
import net.i2p.crypto.ElGamalEngine;
@@ -373,8 +374,12 @@ public class I2PAppContext {
}
private void initializeDSA() {
synchronized (this) {
if (_dsa == null)
_dsa = new DSAEngine(this);
if (_dsa == null) {
if ("off".equals(getProperty("i2p.encryption", "on")))
_dsa = new DummyDSAEngine(this);
else
_dsa = new DSAEngine(this);
}
_dsaInitialized = true;
}
}