Skip to content

Commit

Permalink
fix: don't use StrongBox on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
pwltr committed Sep 12, 2024
1 parent 1d0fa94 commit 2c6769a
Show file tree
Hide file tree
Showing 3 changed files with 278 additions and 43 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"clean:ios": "cd ios && npx del-cli Pods Podfile.lock build && pod deintegrate && pod install",
"bundle": "yarn clean:android && react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.jsbundle --assets-dest android/app/build/intermediates/res/merged/release/ && cd android && ./gradlew assembleRelease --no-daemon",
"prepare": "husky",
"postinstall": "node postinstall.js"
"postinstall": "node postinstall.js; yarn patch-package"
},
"dependencies": {
"@bitcoinerlab/secp256k1": "1.0.5",
Expand Down Expand Up @@ -167,6 +167,7 @@
"lnurl": "0.26.2",
"nano-staged": "^0.8.0",
"node-fetch": "^2.6.7",
"patch-package": "^8.0.0",
"prettier": "^2.8.8",
"react-native-bundle-visualizer": "^3.1.3",
"react-native-skia-stub": "0.0.1",
Expand Down
20 changes: 20 additions & 0 deletions patches/@synonymdev+react-native-keychain+8.2.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/node_modules/@synonymdev/react-native-keychain/android/src/main/java/com/oblador/keychain/cipherStorage/CipherStorageBase.java b/node_modules/@synonymdev/react-native-keychain/android/src/main/java/com/oblador/keychain/cipherStorage/CipherStorageBase.java
index 5c82167..c5e0907 100644
--- a/node_modules/@synonymdev/react-native-keychain/android/src/main/java/com/oblador/keychain/cipherStorage/CipherStorageBase.java
+++ b/node_modules/@synonymdev/react-native-keychain/android/src/main/java/com/oblador/keychain/cipherStorage/CipherStorageBase.java
@@ -409,6 +409,7 @@ abstract public class CipherStorageBase implements CipherStorage {
if (null == isStrongboxAvailable || isStrongboxAvailable.get()) {
if (null == isStrongboxAvailable) isStrongboxAvailable = new AtomicBoolean(false);

+ /*
try {
secretKey = tryGenerateStrongBoxSecurityKey(alias);

@@ -416,6 +417,7 @@ abstract public class CipherStorageBase implements CipherStorage {
} catch (GeneralSecurityException | ProviderException ex) {
Log.w(LOG_TAG, "StrongBox security storage is not available.", ex);
}
+ */
}
}

Loading

0 comments on commit 2c6769a

Please sign in to comment.