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

Commit

Permalink
fix pairing when no SSH key present
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin King committed Oct 23, 2018
1 parent fdd9289 commit 43780dc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "co.krypt.kryptonite"
minSdkVersion 23
targetSdkVersion 26
versionCode 59
versionName "2.5.4"
versionCode 60
versionName "2.5.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
Expand Down
2 changes: 1 addition & 1 deletion app/release/output.json
Original file line number Diff line number Diff line change
@@ -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":{}}]
[{"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":{}}]
1 change: 1 addition & 0 deletions app/src/main/java/co/krypt/krypton/me/MeStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public static SSHKeyPairI getOrLoadKeyPair(Context context) throws CryptoExcepti
return keyPair.get();
}

@Nullable
public Profile load() {
synchronized (lock) {
if (cachedProfile == null) {
Expand Down
6 changes: 5 additions & 1 deletion app/src/main/java/co/krypt/krypton/silo/Silo.java
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,11 @@ public void respondToRequest(Pairing pairing, Request request, boolean requestAl
public Void visit(MeRequest meRequest) throws CryptoException {
if (meRequest.u2fOnly != null && meRequest.u2fOnly) {
response.meResponse = new MeResponse(new Profile());
String deviceName = meStorage.load().email;
String deviceName = null;
Profile profile = meStorage.load();
if (profile != null) {
deviceName = profile.email;
}
if(TextUtils.isEmpty(deviceName)) {
deviceName = MeStorage.getDeviceName();
}
Expand Down

0 comments on commit 43780dc

Please sign in to comment.