diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 30fe5244f..d224884b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -493,7 +493,7 @@ jobs: app_ci_output_filename: App_x64_Debug steps: - name: Set XCode version - uses: maxim-lobanov/setup-xcode@v1 + uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 with: xcode-version: 15.0.1 diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 98a3d0c70..8d04c8c5e 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -38,7 +38,7 @@ jobs: uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: repository: bitwarden/mobile - ref: master + ref: main token: ${{ steps.retrieve-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }} - name: Import GPG key diff --git a/src/App/App.csproj b/src/App/App.csproj index 88018d992..2c88cc36f 100644 --- a/src/App/App.csproj +++ b/src/App/App.csproj @@ -53,10 +53,10 @@ false Automatic - iPhone Developer + iPhone Developer Platforms\iOS\Entitlements.plist - all - + true + -gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a" @@ -66,9 +66,13 @@ Automatic:AppStore iPhone Distribution Platforms\iOS\Entitlements.plist - all + true -gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a" + + + + @@ -90,7 +94,7 @@ - + @@ -216,8 +220,8 @@ $(Home)/Library/Developer/Xcode/DerivedData/bitwarden-acgkbpwvmebfiofokotvoerzkqcl/Build/Products $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)\..'))/watchOS/bitwarden.xcarchive/Products/Applications/bitwarden.app/Watch Bitwarden.app - >watchsimulator - >watchos + watchsimulator + watchos $(WatchAppBuildPath)/$(Configuration)-$(WatchAppConfiguration)/$(WatchAppBundle) $(WatchAppBuildPath)/$(WatchAppBundle) diff --git a/src/App/Platforms/Android/AndroidManifest.xml b/src/App/Platforms/Android/AndroidManifest.xml index ca3072fa7..2a9157e00 100644 --- a/src/App/Platforms/Android/AndroidManifest.xml +++ b/src/App/Platforms/Android/AndroidManifest.xml @@ -1,6 +1,6 @@  - + diff --git a/src/App/Platforms/Android/Services/CryptoPrimitiveService.cs b/src/App/Platforms/Android/Services/CryptoPrimitiveService.cs index 82f8c2038..5dec269fe 100644 --- a/src/App/Platforms/Android/Services/CryptoPrimitiveService.cs +++ b/src/App/Platforms/Android/Services/CryptoPrimitiveService.cs @@ -41,13 +41,13 @@ namespace Bit.Droid.Services JavaSystem.LoadLibrary("argon2"); int keySize = 32; var key = new byte[keySize]; - //argon2id_hash_raw(iterations, memory, parallelism, - // password, password.Length, salt, salt.Length, key, key.Length); + argon2id_hash_raw(iterations, memory, parallelism, + password, password.Length, salt, salt.Length, key, key.Length); return key; } - //[DllImport("argon2", EntryPoint = "argon2id_hash_raw")] - //private static extern int argon2id_hash_raw(int timeCost, int memoryCost, int parallelism, - // byte[] pwd, int pwdlen, byte[] salt, int saltlen, byte[] hash, int hashlen); + [DllImport("argon2", EntryPoint = "argon2id_hash_raw")] + private static extern int argon2id_hash_raw(int timeCost, int memoryCost, int parallelism, + byte[] pwd, int pwdlen, byte[] salt, int saltlen, byte[] hash, int hashlen); } } diff --git a/src/Core/Core.csproj b/src/Core/Core.csproj index 3471f8e48..f9d70cb33 100644 --- a/src/Core/Core.csproj +++ b/src/Core/Core.csproj @@ -38,7 +38,7 @@ all - + diff --git a/src/Core/Utilities/IconImageConverter.cs b/src/Core/Utilities/IconImageConverter.cs index 70225579a..d860aa3d8 100644 --- a/src/Core/Utilities/IconImageConverter.cs +++ b/src/Core/Utilities/IconImageConverter.cs @@ -40,7 +40,7 @@ namespace Bit.App.Utilities string image = null; if (cipher.Login.HasUris) { - foreach (var uri in cipher.Login.Uris) + foreach (var uri in cipher.Login.Uris.Where(u => u.Uri != null)) { var hostnameUri = uri.Uri; var isWebsite = false; diff --git a/src/iOS.Autofill/iOS.Autofill.csproj b/src/iOS.Autofill/iOS.Autofill.csproj index a61e81397..5a988c2b9 100644 --- a/src/iOS.Autofill/iOS.Autofill.csproj +++ b/src/iOS.Autofill/iOS.Autofill.csproj @@ -25,7 +25,7 @@ Automatic iPhone Developer Entitlements.plist - all + true @@ -37,11 +37,15 @@ false + true -gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a" iPhone Distribution Automatic:AppStore Entitlements.plist + + + diff --git a/src/iOS.Core/Services/CryptoPrimitiveService.cs b/src/iOS.Core/Services/CryptoPrimitiveService.cs index 96d4c00f3..e74432dd5 100644 --- a/src/iOS.Core/Services/CryptoPrimitiveService.cs +++ b/src/iOS.Core/Services/CryptoPrimitiveService.cs @@ -1,8 +1,7 @@ -using Bit.Core.Abstractions; +using System.Runtime.InteropServices; +using Bit.Core.Abstractions; using Bit.Core.Enums; using Foundation; -using System; -using System.Runtime.InteropServices; namespace Bit.iOS.Core.Services { @@ -48,8 +47,8 @@ namespace Bit.iOS.Core.Services var passwordData = NSData.FromArray(password); var saltData = NSData.FromArray(salt); - //argon2id_hash_raw(iterations, memory, parallelism, passwordData.Bytes, passwordData.Length, - // saltData.Bytes, saltData.Length, keyData.MutableBytes, keyData.Length); + argon2id_hash_raw(iterations, memory, parallelism, passwordData.Bytes, passwordData.Length, + saltData.Bytes, saltData.Length, keyData.MutableBytes, keyData.Length); var keyBytes = new byte[keyData.Length]; Marshal.Copy(keyData.Bytes, keyBytes, 0, Convert.ToInt32(keyData.Length)); @@ -61,8 +60,8 @@ namespace Bit.iOS.Core.Services private static extern int CCKeyCerivationPBKDF(uint algorithm, IntPtr password, nuint passwordLen, IntPtr salt, nuint saltLen, uint prf, nuint rounds, IntPtr derivedKey, nuint derivedKeyLength); - //[DllImport("__Internal", EntryPoint = "argon2id_hash_raw")] - //private static extern int argon2id_hash_raw(int timeCost, int memoryCost, int parallelism, IntPtr pwd, - // nuint pwdlen, IntPtr salt, nuint saltlen, IntPtr hash, nuint hashlen); + [DllImport("__Internal", EntryPoint = "argon2id_hash_raw")] + private static extern int argon2id_hash_raw(int timeCost, int memoryCost, int parallelism, IntPtr pwd, + nuint pwdlen, IntPtr salt, nuint saltlen, IntPtr hash, nuint hashlen); } } diff --git a/src/iOS.Extension/iOS.Extension.csproj b/src/iOS.Extension/iOS.Extension.csproj index 2e19867a7..0ee903fff 100644 --- a/src/iOS.Extension/iOS.Extension.csproj +++ b/src/iOS.Extension/iOS.Extension.csproj @@ -34,11 +34,15 @@ false + true -gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a" iPhone Distribution Automatic:AppStore Entitlements.plist + + + diff --git a/src/iOS.ShareExtension/iOS.ShareExtension.csproj b/src/iOS.ShareExtension/iOS.ShareExtension.csproj index 68376745a..fa5976b9f 100644 --- a/src/iOS.ShareExtension/iOS.ShareExtension.csproj +++ b/src/iOS.ShareExtension/iOS.ShareExtension.csproj @@ -36,11 +36,15 @@ false + true -gcc_flags "-L$(ProjectDir)../../lib/ios -largon2 -force_load $(ProjectDir)../../lib/ios/libargon2.a" iPhone Distribution Automatic:AppStore Entitlements.plist + + +