Skip to content

Commit

Permalink
Merge branch 'release/1.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
infeo committed Jan 15, 2025
2 parents 65093b3 + 3e179c0 commit 864b0f7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/publish-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ jobs:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
MAVEN_GPG_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
MAVEN_GPG_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
MAVEN_GPG_KEY_FINGERPRINT: ${{ vars.RELEASES_GPG_KEY_FINGERPRINT }}
1 change: 1 addition & 0 deletions .github/workflows/publish-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }}
MAVEN_GPG_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }}
MAVEN_GPG_KEY_FINGERPRINT: ${{ vars.RELEASES_GPG_KEY_FINGERPRINT }}
notify:
runs-on: ubuntu-latest
needs: [publish]
Expand Down
2 changes: 1 addition & 1 deletion integrations-win.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<ClCompile Include="src\main\native\org_cryptomator_windows_autostart_WinShellLinks_Native.cpp" />
<ClCompile Include="src\main\native\org_cryptomator_windows_keychain_WinDataProtection_Native.cpp" />
<ClCompile Include="src\main\native\org_cryptomator_windows_keychain_WindowsHello_Native.cpp" />
<ClCompile Include="src\main\native\org_cryptomator_windows_uiappearnce_WinAppearance_Native.cpp" />
<ClCompile Include="src\main\native\org_cryptomator_windows_uiappearance_WinAppearance_Native.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.cryptomator</groupId>
<artifactId>integrations-win</artifactId>
<version>1.4.0</version>
<version>1.4.1</version>

<name>Cryptomator Integrations for Windows</name>
<description>Provides optional Windows services used by Cryptomator</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ using namespace Windows::Security::Cryptography::Core;
using namespace Windows::Storage::Streams;

static std::atomic<int> g_promptFocusCount{ 0 };
static IBuffer info = CryptographicBuffer::ConvertStringToBinary(L"EncryptionKey", BinaryStringEncoding::Utf8);
static auto HKDF_INFO = L"org.cryptomator.windows.keychain.windowsHello";

// Helper methods for conversion
std::vector<uint8_t> jbyteArrayToVector(JNIEnv* env, jbyteArray array) {
Expand Down Expand Up @@ -96,7 +96,7 @@ IBuffer DeriveKeyUsingHKDF(const IBuffer& inputData, const IBuffer& salt, uint32
if (expandKey.KeySize() < macProvider.MacLength()) {
throw std::runtime_error("Key provided by HMAC_SHA256 implementation is shorter than the HMAC length.");
}
int maxKeySize = 255 * macProvider.MacLength();
auto maxKeySize = 255 * macProvider.MacLength();
if (keySizeInBytes > maxKeySize) {
throw std::runtime_error("HKDF requires keySizeInBytes to be at most " + std::to_string(maxKeySize) + " bytes.");
}
Expand Down Expand Up @@ -153,6 +153,7 @@ bool deriveEncryptionKey(const std::wstring keyId, const std::vector<uint8_t>& c

// Derive the encryption/decryption key using HKDF
const auto response = signature.Result();
IBuffer info = CryptographicBuffer::ConvertStringToBinary(HKDF_INFO, BinaryStringEncoding::Utf8);
key = DeriveKeyUsingHKDF(response, challengeBuffer, 32, info); // needs to be 32 bytes for SHA256
return true;

Expand Down

0 comments on commit 864b0f7

Please sign in to comment.