forked from I2P_Developers/i2p.i2p
SU3File: Also look in config dir for signer certificate
This commit is contained in:
@ -314,6 +314,7 @@ public class SU3File {
|
||||
if (_certFile != null) {
|
||||
_signerPubkey = loadKey(_certFile);
|
||||
} else {
|
||||
// look in both install dir and config dir for the signer cert
|
||||
KeyRing ring = new DirKeyRing(new File(_context.getBaseDir(), "certificates"));
|
||||
try {
|
||||
_signerPubkey = ring.getKey(_signer, _contentType.getName(), _sigType);
|
||||
@ -322,10 +323,26 @@ public class SU3File {
|
||||
ioe.initCause(gse);
|
||||
throw ioe;
|
||||
}
|
||||
if (_signerPubkey == null) {
|
||||
boolean diff = true;
|
||||
try {
|
||||
diff = !_context.getBaseDir().getCanonicalPath().equals(_context.getConfigDir().getCanonicalPath());
|
||||
} catch (IOException ioe) {}
|
||||
if (diff) {
|
||||
ring = new DirKeyRing(new File(_context.getConfigDir(), "certificates"));
|
||||
try {
|
||||
_signerPubkey = ring.getKey(_signer, _contentType.getName(), _sigType);
|
||||
} catch (GeneralSecurityException gse) {
|
||||
IOException ioe = new IOException("keystore error");
|
||||
ioe.initCause(gse);
|
||||
throw ioe;
|
||||
}
|
||||
}
|
||||
if (_signerPubkey == null)
|
||||
throw new IOException("unknown signer: " + _signer + " for content type: " + _contentType.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
_headerVerified = true;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
2016-07-18 zzz
|
||||
* SU3File: Also look in config dir for signer certificate
|
||||
|
||||
2016-07-16 zzz
|
||||
* I2CP Client: Handle disconnect properly if received before first LS
|
||||
* Streaming: Kill accept() when session disconnects
|
||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 4;
|
||||
public final static long BUILD = 5;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
Reference in New Issue
Block a user