From a249151d053bf4bf63ccad91db45ae7a4abea06a Mon Sep 17 00:00:00 2001 From: Andrea Franz Date: Mon, 11 Feb 2019 21:20:59 +0100 Subject: [PATCH] add LoginWithKeycard to mobile pkg (#1372) --- VERSION | 2 +- _assets/ci/Jenkinsfile | 2 +- mobile/status.go | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 1351453f9..9c411507e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.21.0g-beta.1 +0.21.0g-beta.2 diff --git a/_assets/ci/Jenkinsfile b/_assets/ci/Jenkinsfile index cf3fa9a34..9b25c2990 100644 --- a/_assets/ci/Jenkinsfile +++ b/_assets/ci/Jenkinsfile @@ -61,7 +61,7 @@ pipeline { stage('Archive') { steps { script { - sh("rm -f ${env.RELEASE_DIRECTORY}/*") + sh("rm -fr ${env.RELEASE_DIRECTORY}/*") lib.copyArts('status-go/platforms/ios', ios.number) lib.copyArts('status-go/platforms/android', android.number) lib.copyArts('status-go/platforms/linux', linux.number) diff --git a/mobile/status.go b/mobile/status.go index 6d0a6e323..2d7ee912d 100644 --- a/mobile/status.go +++ b/mobile/status.go @@ -323,6 +323,13 @@ func Login(address, password string) string { return makeJSONResponse(err) } +// LoginWithKeycard initializes an account with a chat key and encryption key used for PFS. +// It purges all the previous identities from Whisper, and injects the key as shh identity. +func LoginWithKeycard(chatKeyData, encryptionKeyData string) string { + err := statusBackend.InjectChatAccount(chatKeyData, encryptionKeyData) + return makeJSONResponse(err) +} + // Logout is equivalent to clearing whisper identities. func Logout() string { err := statusBackend.Logout()