Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Switch to bouncycastle and drop SpongyCastle (see rtyley/spongycastle#34
Browse files Browse the repository at this point in the history
), fix #201
  • Loading branch information
eidottermihi committed May 4, 2021
1 parent 95f3510 commit 34be227
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
13 changes: 5 additions & 8 deletions ssh/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@ dependencies {
compile "com.google.guava:guava:20.0"
compile "org.ocpsoft.prettytime:prettytime:2.1.2.Final"
compile "org.slf4j:slf4j-api:$rootProject.ext.slf4jVersion"
compile "com.madgag.spongycastle:core:1.56.0.0"
compile "com.madgag.spongycastle:prov:1.56.0.0"
compile "com.madgag.spongycastle:bcpkix-jdk15on:1.56.0.0"
compile "com.madgag.spongycastle:bcpg-jdk15on:1.56.0.0"

compile "com.hierynomus:sshj:0.29.0"
compile "org.bouncycastle:bcprov-jdk15on:1.57"
compile "org.bouncycastle:bcpkix-jdk15on:1.57"
compile "com.hierynomus:sshj:0.31.0"
compile "org.bouncycastle:bcprov-jdk15on:1.68"
compile "org.bouncycastle:bcpkix-jdk15on:1.68"
compile "org.bouncycastle:bcpg-jdk15on:1.68"
compile "com.jcraft:jzlib:1.1.3"
compile "net.i2p.crypto:eddsa:0.2.0"
compile "net.i2p.crypto:eddsa:0.3.0"
// end quick fix dependencies

testCompile "junit:junit:4.12"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import net.schmizz.sshj.userauth.UserAuthException;
import net.schmizz.sshj.userauth.keyprovider.KeyProvider;

import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -83,15 +84,14 @@ public class RaspiQuery implements IQueryService {
private static final String N_A = "n/a";

private static final int DEFAULT_SSH_PORT = 22;
private static final String BOUNCY_CASTLE_PROVIDER_NAME = "BC";
private SSHClient client;
private String hostname;
private String username;
private int port = DEFAULT_SSH_PORT;

static {
Security.removeProvider(BOUNCY_CASTLE_PROVIDER_NAME);
Security.addProvider(new org.spongycastle.jce.provider.BouncyCastleProvider());
Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME);
Security.addProvider(new BouncyCastleProvider());
}

/**
Expand Down

0 comments on commit 34be227

Please sign in to comment.