aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2023-01-26 13:00:13 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2023-01-26 13:00:13 +0530
commit5e0e0a8be20cfe7641c7691fd8caf585f24aa95a (patch)
treeda0185d66298bd8d2c44106e1baabec1c1e79538
parente17a17a8e840230651cb6f7d9f9d46e252637e77 (diff)
chore(deps): upgrade security-crypto to 1.1.0-alpha04
-rw-r--r--.github/renovate.json52
-rw-r--r--app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt20
-rw-r--r--gradle/libs.versions.toml2
3 files changed, 8 insertions, 16 deletions
diff --git a/.github/renovate.json5 b/.github/renovate.json5
index bd144125..d3c98f5c 100644
--- a/.github/renovate.json5
+++ b/.github/renovate.json5
@@ -24,8 +24,6 @@
"^com.android.tools:desugar_jdk_libs",
// Later versions require newer JDKs
"^commons-codec:commons-codec",
- // https://github.com/android-password-store/Android-Password-Store/issues/2247
- "^androidx.security:security-crypto",
],
"enabled": false
},
diff --git a/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt b/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt
index bdced9af..e7f5dd96 100644
--- a/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt
+++ b/app/src/main/java/app/passwordstore/util/git/sshj/SshKey.kt
@@ -232,18 +232,15 @@ object SshKey {
type = if (isGenerated) Type.LegacyGenerated else Type.Imported
}
- @Suppress("BlockingMethodInNonBlockingContext")
private suspend fun getOrCreateWrappingMasterKey(requireAuthentication: Boolean) =
withContext(Dispatchers.IO) {
- MasterKey.Builder(context, KEYSTORE_ALIAS).run {
- setKeyScheme(MasterKey.KeyScheme.AES256_GCM)
- setRequestStrongBoxBacked(true)
- setUserAuthenticationRequired(requireAuthentication, 15)
- build()
- }
+ MasterKey.Builder(context, KEYSTORE_ALIAS)
+ .setKeyScheme(MasterKey.KeyScheme.AES256_GCM)
+ .setRequestStrongBoxBacked(true)
+ .setUserAuthenticationRequired(requireAuthentication, 15)
+ .build()
}
- @Suppress("BlockingMethodInNonBlockingContext")
private suspend fun getOrCreateWrappedPrivateKeyFile(requireAuthentication: Boolean) =
withContext(Dispatchers.IO) {
EncryptedFile.Builder(
@@ -252,13 +249,10 @@ object SshKey {
getOrCreateWrappingMasterKey(requireAuthentication),
EncryptedFile.FileEncryptionScheme.AES256_GCM_HKDF_4KB
)
- .run {
- setKeysetPrefName(ANDROIDX_SECURITY_KEYSET_PREF_NAME)
- build()
- }
+ .setKeysetPrefName(ANDROIDX_SECURITY_KEYSET_PREF_NAME)
+ .build()
}
- @Suppress("BlockingMethodInNonBlockingContext")
suspend fun generateKeystoreWrappedEd25519Key(requireAuthentication: Boolean) =
withContext(Dispatchers.IO) {
delete()
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 93fa9207..2dd72151 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -31,7 +31,7 @@ androidx-material = "com.google.android.material:material:1.9.0-alpha01"
androidx-preference = "androidx.preference:preference:1.2.0"
androidx-recyclerview = "androidx.recyclerview:recyclerview:1.3.0-rc01"
androidx-recyclerviewSelection = "androidx.recyclerview:recyclerview-selection:1.2.0-alpha01"
-androidx-security = "androidx.security:security-crypto:1.1.0-alpha03"
+androidx-security = "androidx.security:security-crypto-ktx:1.1.0-alpha04"
androidx-swiperefreshlayout = "androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01"
aps-sublimeFuzzy = "com.github.android-password-store:sublime-fuzzy:2.3.0"
aps-zxingAndroidEmbedded = "com.github.android-password-store:zxing-android-embedded:4.2.1"