I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit b0bca2f1 authored by zzz's avatar zzz
Browse files

Util: Avoid dup context warning when SU3File called twice from gradle

parent d9775a5f
No related branches found
No related tags found
No related merge requests found
......@@ -623,22 +623,30 @@ public class SU3File {
} else if ("showversion".equals(cmd)) {
ok = showVersionCLI(a.get(0));
} else if ("sign".equals(cmd)) {
// speed things up by specifying a small PRNG buffer size
Properties props = new Properties();
props.setProperty("prng.bufferSize", "16384");
new I2PAppContext(props);
if (I2PAppContext.getCurrentContext() == null) {
// speed things up by specifying a small PRNG buffer size
Properties props = new Properties();
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);
} else if ("bulksign".equals(cmd)) {
Properties props = new Properties();
props.setProperty("prng.bufferSize", "16384");
new I2PAppContext(props);
if (I2PAppContext.getCurrentContext() == null) {
// speed things up by specifying a small PRNG buffer size
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);
} else if ("verifysig".equals(cmd)) {
ok = verifySigCLI(a.get(0), kfile);
} else if ("keygen".equals(cmd)) {
Properties props = new Properties();
props.setProperty("prng.bufferSize", "16384");
new I2PAppContext(props);
if (I2PAppContext.getCurrentContext() == null) {
// speed things up by specifying a small PRNG buffer size
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);
} else if ("extract".equals(cmd)) {
String outfile = (a.size() > 1) ? a.get(1) : null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment