Skip to content

Commit

Permalink
refactor extracts method for security inits
Browse files Browse the repository at this point in the history
  • Loading branch information
lkwg82 authored and AsamK committed Jan 27, 2020
1 parent 88a5614 commit f3ecddb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main/java/org/asamk/signal/Main.java
Expand Up @@ -49,9 +49,7 @@
public class Main {

public static void main(String[] args) {
// Register our own security provider
Security.insertProviderAt(new SecurityProvider(), 1);
Security.addProvider(new BouncyCastleProvider());
installSecurityProviderWorkaround();

Namespace ns = parseArgs(args);
if (ns == null) {
Expand All @@ -62,6 +60,12 @@ public static void main(String[] args) {
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) {
final String username = ns.getString("username");
Manager m;
Expand Down

0 comments on commit f3ecddb

Please sign in to comment.