Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't use StrongBox on Android #2231

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -161,6 +161,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);
}
+ */
}
}

169 changes: 168 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5640,6 +5640,13 @@ __metadata:
languageName: node
linkType: hard

"@yarnpkg/lockfile@npm:^1.1.0":
version: 1.1.0
resolution: "@yarnpkg/lockfile@npm:1.1.0"
checksum: 05b881b4866a3546861fee756e6d3812776ea47fa6eb7098f983d6d0eefa02e12b66c3fff931574120f196286a7ad4879ce02743c8bb2be36c6a576c7852083a
languageName: node
linkType: hard

"JSONStream@npm:^1.3.5":
version: 1.3.5
resolution: "JSONStream@npm:1.3.5"
Expand Down Expand Up @@ -6039,6 +6046,13 @@ __metadata:
languageName: node
linkType: hard

"at-least-node@npm:^1.0.0":
version: 1.0.0
resolution: "at-least-node@npm:1.0.0"
checksum: 463e2f8e43384f1afb54bc68485c436d7622acec08b6fad269b421cb1d29cebb5af751426793d0961ed243146fe4dc983402f6d5a51b720b277818dbf6f2e49e
languageName: node
linkType: hard

"available-typed-arrays@npm:^1.0.5":
version: 1.0.5
resolution: "available-typed-arrays@npm:1.0.5"
Expand Down Expand Up @@ -6630,6 +6644,7 @@ __metadata:
lottie-react-native: 6.7.2
nano-staged: ^0.8.0
node-fetch: ^2.6.7
patch-package: ^8.0.0
prettier: ^2.8.8
react: 18.3.1
react-i18next: 14.1.0
Expand Down Expand Up @@ -6804,6 +6819,15 @@ __metadata:
languageName: node
linkType: hard

"braces@npm:^3.0.3":
version: 3.0.3
resolution: "braces@npm:3.0.3"
dependencies:
fill-range: ^7.1.1
checksum: b95aa0b3bd909f6cd1720ffcf031aeaf46154dd88b4da01f9a1d3f7ea866a79eba76a6d01cbc3c422b2ee5cdc39a4f02491058d5df0d7bf6e6a162a832df1f69
languageName: node
linkType: hard

"brorand@npm:^1.1.0":
version: 1.1.0
resolution: "brorand@npm:1.1.0"
Expand Down Expand Up @@ -7333,6 +7357,13 @@ __metadata:
languageName: node
linkType: hard

"ci-info@npm:^3.7.0":
version: 3.9.0
resolution: "ci-info@npm:3.9.0"
checksum: 6b19dc9b2966d1f8c2041a838217299718f15d6c4b63ae36e4674edd2bee48f780e94761286a56aa59eb305a85fbea4ddffb7630ec063e7ec7e7e5ad42549a87
languageName: node
linkType: hard

"cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3":
version: 1.0.4
resolution: "cipher-base@npm:1.0.4"
Expand Down Expand Up @@ -9251,6 +9282,15 @@ __metadata:
languageName: node
linkType: hard

"fill-range@npm:^7.1.1":
version: 7.1.1
resolution: "fill-range@npm:7.1.1"
dependencies:
to-regex-range: ^5.0.1
checksum: b4abfbca3839a3d55e4ae5ec62e131e2e356bf4859ce8480c64c4876100f4df292a63e5bb1618e1d7460282ca2b305653064f01654474aa35c68000980f17798
languageName: node
linkType: hard

"filter-obj@npm:^1.1.0":
version: 1.1.0
resolution: "filter-obj@npm:1.1.0"
Expand Down Expand Up @@ -9348,6 +9388,15 @@ __metadata:
languageName: node
linkType: hard

"find-yarn-workspace-root@npm:^2.0.0":
version: 2.0.0
resolution: "find-yarn-workspace-root@npm:2.0.0"
dependencies:
micromatch: ^4.0.2
checksum: fa5ca8f9d08fe7a54ce7c0a5931ff9b7e36f9ee7b9475fb13752bcea80ec6b5f180fa5102d60b376d5526ce924ea3fc6b19301262efa0a5d248dd710f3644242
languageName: node
linkType: hard

"flat-cache@npm:^3.0.4":
version: 3.2.0
resolution: "flat-cache@npm:3.2.0"
Expand Down Expand Up @@ -9493,6 +9542,18 @@ __metadata:
languageName: node
linkType: hard

"fs-extra@npm:^9.0.0":
version: 9.1.0
resolution: "fs-extra@npm:9.1.0"
dependencies:
at-least-node: ^1.0.0
graceful-fs: ^4.2.0
jsonfile: ^6.0.1
universalify: ^2.0.0
checksum: ba71ba32e0faa74ab931b7a0031d1523c66a73e225de7426e275e238e312d07313d2da2d33e34a52aa406c8763ade5712eb3ec9ba4d9edce652bcacdc29e6b20
languageName: node
linkType: hard

"fs-minipass@npm:^2.0.0":
version: 2.1.0
resolution: "fs-minipass@npm:2.1.0"
Expand Down Expand Up @@ -11607,6 +11668,18 @@ __metadata:
languageName: node
linkType: hard

"json-stable-stringify@npm:^1.0.2":
version: 1.1.1
resolution: "json-stable-stringify@npm:1.1.1"
dependencies:
call-bind: ^1.0.5
isarray: ^2.0.5
jsonify: ^0.0.1
object-keys: ^1.1.1
checksum: e1ba06600fd278767eeff53f28e408e29c867e79abf564e7aadc3ce8f31f667258f8db278ef28831e45884dd687388fa1910f46e599fc19fb94c9afbbe3a4de8
languageName: node
linkType: hard

"json5@npm:^2.2.2, json5@npm:^2.2.3":
version: 2.2.3
resolution: "json5@npm:2.2.3"
Expand Down Expand Up @@ -11641,6 +11714,13 @@ __metadata:
languageName: node
linkType: hard

"jsonify@npm:^0.0.1":
version: 0.0.1
resolution: "jsonify@npm:0.0.1"
checksum: 027287e1c0294fce15f18c0ff990cfc2318e7f01fb76515f784d5cd0784abfec6fc5c2355c3a2f2cb0ad7f4aa2f5b74ebbfe4e80476c35b2d13cabdb572e1134
languageName: node
linkType: hard

"jsonparse@npm:^1.2.0":
version: 1.3.1
resolution: "jsonparse@npm:1.3.1"
Expand Down Expand Up @@ -11676,6 +11756,15 @@ __metadata:
languageName: node
linkType: hard

"klaw-sync@npm:^6.0.0":
version: 6.0.0
resolution: "klaw-sync@npm:6.0.0"
dependencies:
graceful-fs: ^4.1.11
checksum: 0da397f8961313c3ef8f79fb63af9002cde5a8fb2aeb1a37351feff0dd6006129c790400c3f5c3b4e757bedcabb13d21ec0a5eaef5a593d59515d4f2c291e475
languageName: node
linkType: hard

"kleur@npm:^3.0.3":
version: 3.0.3
resolution: "kleur@npm:3.0.3"
Expand Down Expand Up @@ -12423,6 +12512,16 @@ __metadata:
languageName: node
linkType: hard

"micromatch@npm:^4.0.2":
version: 4.0.7
resolution: "micromatch@npm:4.0.7"
dependencies:
braces: ^3.0.3
picomatch: ^2.3.1
checksum: 3cde047d70ad80cf60c787b77198d680db3b8c25b23feb01de5e2652205d9c19f43bd81882f69a0fd1f0cde6a7a122d774998aad3271ddb1b8accf8a0f480cf7
languageName: node
linkType: hard

"micromatch@npm:^4.0.4":
version: 4.0.5
resolution: "micromatch@npm:4.0.5"
Expand Down Expand Up @@ -13267,7 +13366,7 @@ __metadata:
languageName: node
linkType: hard

"open@npm:^7.0.3, open@npm:^7.3.1":
"open@npm:^7.0.3, open@npm:^7.3.1, open@npm:^7.4.2":
version: 7.4.2
resolution: "open@npm:7.4.2"
dependencies:
Expand Down Expand Up @@ -13326,6 +13425,13 @@ __metadata:
languageName: node
linkType: hard

"os-tmpdir@npm:~1.0.2":
version: 1.0.2
resolution: "os-tmpdir@npm:1.0.2"
checksum: 5666560f7b9f10182548bf7013883265be33620b1c1b4a4d405c25be2636f970c5488ff3e6c48de75b55d02bde037249fe5dbfbb4c0fb7714953d56aed062e6d
languageName: node
linkType: hard

"p-defer@npm:^3.0.0":
version: 3.0.0
resolution: "p-defer@npm:3.0.0"
Expand Down Expand Up @@ -13475,6 +13581,31 @@ __metadata:
languageName: node
linkType: hard

"patch-package@npm:^8.0.0":
version: 8.0.0
resolution: "patch-package@npm:8.0.0"
dependencies:
"@yarnpkg/lockfile": ^1.1.0
chalk: ^4.1.2
ci-info: ^3.7.0
cross-spawn: ^7.0.3
find-yarn-workspace-root: ^2.0.0
fs-extra: ^9.0.0
json-stable-stringify: ^1.0.2
klaw-sync: ^6.0.0
minimist: ^1.2.6
open: ^7.4.2
rimraf: ^2.6.3
semver: ^7.5.3
slash: ^2.0.0
tmp: ^0.0.33
yaml: ^2.2.2
bin:
patch-package: index.js
checksum: d23cddc4d1622e2d8c7ca31b145c6eddb24bd271f69905e766de5e1f199f0b9a5479a6a6939ea857288399d4ed249285639d539a2c00fbddb7daa39934b007a2
languageName: node
linkType: hard

"path-dirname@npm:^1.0.2":
version: 1.0.2
resolution: "path-dirname@npm:1.0.2"
Expand Down Expand Up @@ -14954,6 +15085,17 @@ __metadata:
languageName: node
linkType: hard

"rimraf@npm:^2.6.3":
version: 2.7.1
resolution: "rimraf@npm:2.7.1"
dependencies:
glob: ^7.1.3
bin:
rimraf: ./bin.js
checksum: cdc7f6eacb17927f2a075117a823e1c5951792c6498ebcce81ca8203454a811d4cf8900314154d3259bb8f0b42ab17f67396a8694a54cae3283326e57ad250cd
languageName: node
linkType: hard

"rimraf@npm:^3.0.2":
version: 3.0.2
resolution: "rimraf@npm:3.0.2"
Expand Down Expand Up @@ -15476,6 +15618,13 @@ __metadata:
languageName: node
linkType: hard

"slash@npm:^2.0.0":
version: 2.0.0
resolution: "slash@npm:2.0.0"
checksum: 512d4350735375bd11647233cb0e2f93beca6f53441015eea241fe784d8068281c3987fbaa93e7ef1c38df68d9c60013045c92837423c69115297d6169aa85e6
languageName: node
linkType: hard

"slash@npm:^3.0.0":
version: 3.0.0
resolution: "slash@npm:3.0.0"
Expand Down Expand Up @@ -16164,6 +16313,15 @@ __metadata:
languageName: node
linkType: hard

"tmp@npm:^0.0.33":
version: 0.0.33
resolution: "tmp@npm:0.0.33"
dependencies:
os-tmpdir: ~1.0.2
checksum: 902d7aceb74453ea02abbf58c203f4a8fc1cead89b60b31e354f74ed5b3fb09ea817f94fb310f884a5d16987dd9fa5a735412a7c2dd088dd3d415aa819ae3a28
languageName: node
linkType: hard

"tmpl@npm:1.0.5":
version: 1.0.5
resolution: "tmpl@npm:1.0.5"
Expand Down Expand Up @@ -17033,6 +17191,15 @@ __metadata:
languageName: node
linkType: hard

"yaml@npm:^2.2.2":
version: 2.4.5
resolution: "yaml@npm:2.4.5"
bin:
yaml: bin.mjs
checksum: f8efd407c07e095f00f3031108c9960b2b12971d10162b1ec19007200f6c987d2e28f73283f4731119aa610f177a3ea03d4a8fcf640600a25de1b74d00c69b3d
languageName: node
linkType: hard

"yargs-parser@npm:^18.1.2":
version: 18.1.3
resolution: "yargs-parser@npm:18.1.3"
Expand Down
Loading