Skip to content
This repository was archived by the owner on Nov 7, 2023. It is now read-only.

Commit 43780dc

Browse files
author
Kevin King
committed
fix pairing when no SSH key present
1 parent fdd9289 commit 43780dc

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
applicationId "co.krypt.kryptonite"
99
minSdkVersion 23
1010
targetSdkVersion 26
11-
versionCode 59
12-
versionName "2.5.4"
11+
versionCode 60
12+
versionName "2.5.5"
1313
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1414
externalNativeBuild {
1515
cmake {

app/release/output.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":59,"versionName":"2.5.4","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
1+
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":60,"versionName":"2.5.5","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

app/src/main/java/co/krypt/krypton/me/MeStorage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public static SSHKeyPairI getOrLoadKeyPair(Context context) throws CryptoExcepti
5959
return keyPair.get();
6060
}
6161

62+
@Nullable
6263
public Profile load() {
6364
synchronized (lock) {
6465
if (cachedProfile == null) {

app/src/main/java/co/krypt/krypton/silo/Silo.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,11 @@ public void respondToRequest(Pairing pairing, Request request, boolean requestAl
400400
public Void visit(MeRequest meRequest) throws CryptoException {
401401
if (meRequest.u2fOnly != null && meRequest.u2fOnly) {
402402
response.meResponse = new MeResponse(new Profile());
403-
String deviceName = meStorage.load().email;
403+
String deviceName = null;
404+
Profile profile = meStorage.load();
405+
if (profile != null) {
406+
deviceName = profile.email;
407+
}
404408
if(TextUtils.isEmpty(deviceName)) {
405409
deviceName = MeStorage.getDeviceName();
406410
}

0 commit comments

Comments
 (0)