forked from I2P_Developers/i2p.i2p
Util: Avoid dup context warning when SU3File called twice from gradle
This commit is contained in:
@ -623,22 +623,30 @@ public class SU3File {
|
|||||||
} else if ("showversion".equals(cmd)) {
|
} else if ("showversion".equals(cmd)) {
|
||||||
ok = showVersionCLI(a.get(0));
|
ok = showVersionCLI(a.get(0));
|
||||||
} else if ("sign".equals(cmd)) {
|
} else if ("sign".equals(cmd)) {
|
||||||
// speed things up by specifying a small PRNG buffer size
|
if (I2PAppContext.getCurrentContext() == null) {
|
||||||
Properties props = new Properties();
|
// speed things up by specifying a small PRNG buffer size
|
||||||
props.setProperty("prng.bufferSize", "16384");
|
Properties props = new Properties();
|
||||||
new I2PAppContext(props);
|
props.setProperty("prng.bufferSize", "16384");
|
||||||
|
new I2PAppContext(props);
|
||||||
|
}
|
||||||
ok = signCLI(stype, ctype, ftype, a.get(0), a.get(1), a.get(2), a.get(3), a.get(4), "", kspass);
|
ok = signCLI(stype, ctype, ftype, a.get(0), a.get(1), a.get(2), a.get(3), a.get(4), "", kspass);
|
||||||
} else if ("bulksign".equals(cmd)) {
|
} else if ("bulksign".equals(cmd)) {
|
||||||
Properties props = new Properties();
|
if (I2PAppContext.getCurrentContext() == null) {
|
||||||
props.setProperty("prng.bufferSize", "16384");
|
// speed things up by specifying a small PRNG buffer size
|
||||||
new I2PAppContext(props);
|
Properties props = new Properties();
|
||||||
|
props.setProperty("prng.bufferSize", "16384");
|
||||||
|
new I2PAppContext(props);
|
||||||
|
}
|
||||||
ok = bulkSignCLI(stype, ctype, a.get(0), a.get(1), a.get(2), a.get(3), kspass);
|
ok = bulkSignCLI(stype, ctype, a.get(0), a.get(1), a.get(2), a.get(3), kspass);
|
||||||
} else if ("verifysig".equals(cmd)) {
|
} else if ("verifysig".equals(cmd)) {
|
||||||
ok = verifySigCLI(a.get(0), kfile);
|
ok = verifySigCLI(a.get(0), kfile);
|
||||||
} else if ("keygen".equals(cmd)) {
|
} else if ("keygen".equals(cmd)) {
|
||||||
Properties props = new Properties();
|
if (I2PAppContext.getCurrentContext() == null) {
|
||||||
props.setProperty("prng.bufferSize", "16384");
|
// speed things up by specifying a small PRNG buffer size
|
||||||
new I2PAppContext(props);
|
Properties props = new Properties();
|
||||||
|
props.setProperty("prng.bufferSize", "16384");
|
||||||
|
new I2PAppContext(props);
|
||||||
|
}
|
||||||
ok = genKeysCLI(stype, a.get(0), a.get(1), crlfile, a.get(2), kspass);
|
ok = genKeysCLI(stype, a.get(0), a.get(1), crlfile, a.get(2), kspass);
|
||||||
} else if ("extract".equals(cmd)) {
|
} else if ("extract".equals(cmd)) {
|
||||||
String outfile = (a.size() > 1) ? a.get(1) : null;
|
String outfile = (a.size() > 1) ? a.get(1) : null;
|
||||||
|
Reference in New Issue
Block a user