mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Use custom SecureRandom instance
- Use NativePRNG algorithm instead of using SHA1PRNG if available - Register a custom security provider to use the same SecureRandom everywhere
This commit is contained in:
parent
cf972e5b6c
commit
5f2190713a
4 changed files with 88 additions and 14 deletions
|
@ -24,6 +24,8 @@ import org.asamk.Signal;
|
|||
import org.asamk.signal.commands.*;
|
||||
import org.asamk.signal.manager.BaseConfig;
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.asamk.signal.util.SecurityProvider;
|
||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||
import org.freedesktop.dbus.DBusConnection;
|
||||
import org.freedesktop.dbus.exceptions.DBusException;
|
||||
import org.whispersystems.signalservice.api.util.PhoneNumberFormatter;
|
||||
|
@ -35,8 +37,9 @@ import java.util.Map;
|
|||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// Workaround for BKS truststore
|
||||
Security.insertProviderAt(new org.bouncycastle.jce.provider.BouncyCastleProvider(), 1);
|
||||
// Register our own security provider
|
||||
Security.insertProviderAt(new SecurityProvider(), 1);
|
||||
Security.addProvider(new BouncyCastleProvider());
|
||||
|
||||
Namespace ns = parseArgs(args);
|
||||
if (ns == null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue