Skip to content

Commit

Permalink
Lifting tweaks in CustomSshJConfig to enable advanced crypto features
Browse files Browse the repository at this point in the history
Addresses #1961.

Previously due to preventing conflict with stock BouncyCastle on Android devices some tweaks were added to CustomSshJConfig. But with full adaptation of BouncyCastle over the stock one it should be safe to remove the tweaks and use stock features as much as possible.

Tested on Fairphone 3 running LineageOS 16.0 (9.0), using ED25519 private key to authenticate against OpenSSH server 8.2p1 on Ubuntu 20.04.
  • Loading branch information
TranceLove committed Aug 19, 2020
1 parent 21a3586 commit 14691f2
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
import java.security.Security;

import net.schmizz.sshj.DefaultConfig;
import net.schmizz.sshj.signature.SignatureDSA;
import net.schmizz.sshj.signature.SignatureRSA;
import net.schmizz.sshj.transport.random.JCERandom;
import net.schmizz.sshj.transport.random.SingletonRandomFactory;

/**
* sshj {@link net.schmizz.sshj.Config} for our own use.
Expand All @@ -44,14 +40,4 @@ public static void init() {
Security.removeProvider("BC");
Security.insertProviderAt(new org.bouncycastle.jce.provider.BouncyCastleProvider(), 0);
}

// don't add ECDSA
protected void initSignatureFactories() {
setSignatureFactories(new SignatureRSA.Factory(), new SignatureDSA.Factory());
}

@Override
protected void initRandomFactory(boolean ignored) {
setRandomFactory(new SingletonRandomFactory(new JCERandom.Factory()));
}
}

0 comments on commit 14691f2

Please sign in to comment.