mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
refactor extracts method for security inits
This commit is contained in:
parent
88a5614f2b
commit
f3ecddba6f
1 changed files with 7 additions and 3 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue