refactor extracts method for security inits

This commit is contained in:
Lars K.W. Gohlke 2020-01-26 22:02:15 +01:00 committed by AsamK
parent 88a5614f2b
commit f3ecddba6f

View file

@ -49,9 +49,7 @@ import static org.whispersystems.signalservice.internal.util.Util.isEmpty;
public class Main { public class Main {
public static void main(String[] args) { public static void main(String[] args) {
// Register our own security provider installSecurityProviderWorkaround();
Security.insertProviderAt(new SecurityProvider(), 1);
Security.addProvider(new BouncyCastleProvider());
Namespace ns = parseArgs(args); Namespace ns = parseArgs(args);
if (ns == null) { if (ns == null) {
@ -62,6 +60,12 @@ public class Main {
System.exit(res); System.exit(res);
} }
public static void installSecurityProviderWorkaround() {
// Register our own security provider
Security.insertProviderAt(new SecurityProvider(), 1);
Security.addProvider(new BouncyCastleProvider());
}
private static int handleCommands(Namespace ns) { private static int handleCommands(Namespace ns) {
final String username = ns.getString("username"); final String username = ns.getString("username");
Manager m; Manager m;