Router: Remove unused test support for AES disabled

This commit is contained in:
zzz
2019-03-14 15:19:23 +00:00
parent 0b5a36d5eb
commit 7511de68a4
3 changed files with 4 additions and 14 deletions

View File

@ -694,10 +694,7 @@ public class I2PAppContext {
private void initializeAESEngine() { private void initializeAESEngine() {
synchronized (_lock7) { synchronized (_lock7) {
if (_AESEngine == null) { if (_AESEngine == null) {
if ("off".equals(getProperty("i2p.encryption", "on"))) _AESEngine = new CryptixAESEngine(this);
_AESEngine = new AESEngine(this);
else
_AESEngine = new CryptixAESEngine(this);
} }
_AESEngineInitialized = true; _AESEngineInitialized = true;
} }

View File

@ -18,15 +18,14 @@ import net.i2p.util.SimpleByteCache;
/** /**
* Dummy wrapper for AES cipher operation. * Dummy wrapper for AES cipher operation.
* Warning - * Warning - most methods UNUSED.
* most methods UNUSED unless i2p.encryption = off
* See CryptixAESEngine overrides for the real thing. * See CryptixAESEngine overrides for the real thing.
*/ */
public class AESEngine { public class AESEngine {
protected final Log _log; protected final Log _log;
protected final I2PAppContext _context; protected final I2PAppContext _context;
public AESEngine(I2PAppContext ctx) { protected AESEngine(I2PAppContext ctx) {
_context = ctx; _context = ctx;
_log = _context.logManager().getLog(getClass()); _log = _context.logManager().getLog(getClass());
if (getClass().equals(AESEngine.class)) if (getClass().equals(AESEngine.class))

View File

@ -32,15 +32,9 @@ import net.i2p.router.Router;
* (where "rN" is an instance number, such as r0 or r9). * (where "rN" is an instance number, such as r0 or r9).
* Additionally, two other properties might be useful:<ul> * Additionally, two other properties might be useful:<ul>
* <li>i2p.vmCommSystem=true</li> * <li>i2p.vmCommSystem=true</li>
* <li>i2p.encryption=off</li>
* </ul> * </ul>
* The first line tells the router to use an in-VM comm system for sending * The first line tells the router to use an in-VM comm system for sending
* messages back and forth between routers (see net.i2p.transport.VMCommSystem), * messages back and forth between routers (see net.i2p.transport.VMCommSystem).
* and the second tells the router to stub out ElGamal, AES, and DSA code, reducing
* the CPU load (but obviously making the router incapable of talking to things
* that need the encryption enabled). To run a client app through a router that
* has i2p.encryption=off, you should also add that line to the client's JVM
* (for example, <code>java -Di2p.encryption=off -jar lib/i2ptunnel.jar</code>).<p>
* *
* To make the router console work, either run from a directory containing * To make the router console work, either run from a directory containing
* lib/, webapps/, docs/, etc., or point i2p.dir.base to a directory containing the * lib/, webapps/, docs/, etc., or point i2p.dir.base to a directory containing the