Skip to content

Commit

Permalink
JCOP4 workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
bitgamma committed Apr 16, 2020
1 parent e110c64 commit 677c234
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dependencies {
testCompile('org.web3j:core:2.3.1')
testCompile('org.bitcoinj:bitcoinj-core:0.14.5')
testCompile('com.github.status-im.status-keycard-java:desktop:3.0.0')
testCompile('org.bouncycastle:bcprov-jdk15on:1.60')
testCompile('org.bouncycastle:bcprov-jdk15on:1.65')
testCompile("org.junit.jupiter:junit-jupiter-api:5.1.1")
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.1.1")
}
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/im/status/keycard/SecureChannel.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public SecureChannel(byte pairingLimit, Crypto crypto, SECP256k1 secp256k1) {
scKeypair.genKeyPair();

remainingSlots = pairingLimit;

pairingSecret = new byte[SC_SECRET_LENGTH];
}

/**
Expand All @@ -75,9 +75,6 @@ public SecureChannel(byte pairingLimit, Crypto crypto, SECP256k1 secp256k1) {
* @param off the offset in the buffer
*/
public void initSecureChannel(byte[] aPairingSecret, short off) {
if (pairingSecret != null) return;

pairingSecret = new byte[SC_SECRET_LENGTH];
Util.arrayCopy(aPairingSecret, off, pairingSecret, (short) 0, SC_SECRET_LENGTH);
scKeypair.genKeyPair();
}
Expand Down

0 comments on commit 677c234

Please sign in to comment.