Skip to content

Commit

Permalink
Fix #502: Unable to compile after adding support for temporary keys
Browse files Browse the repository at this point in the history
  • Loading branch information
banterCZ committed Sep 3, 2024
1 parent 2d26a35 commit 9d6ef22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public static void unlockVaultAndECDSASignatureTest(PowerAuthClient powerAuthCli
final PublicKey serverPublicKey = KEY_CONVERTOR.convertBytesToPublicKey(serverPublicKeyBytes);
final ClientEncryptor clientEncryptor = ENCRYPTOR_FACTORY.getClientEncryptor(
EncryptorId.VAULT_UNLOCK,
new EncryptorParameters(version, config.getApplicationKey(), config.getActivationId(version)),
new EncryptorParameters(version, config.getApplicationKey(), config.getActivationId(version), null),
new ClientEncryptorSecrets(serverPublicKey, config.getApplicationSecret(), transportMasterKeyBytes)
);
VaultUnlockRequestPayload requestPayload = new VaultUnlockRequestPayload();
Expand Down Expand Up @@ -224,7 +224,7 @@ public static void recoveryCodeConfirmAndActivationTest(PowerAuthClient powerAut
requestL2.setDevicePublicKey(devicePublicKeyBase64);
ClientEncryptor clientEncryptorL2 = ENCRYPTOR_FACTORY.getClientEncryptor(
EncryptorId.ACTIVATION_LAYER_2,
new EncryptorParameters(version, config.getApplicationKey(), null),
new EncryptorParameters(version, config.getApplicationKey(), null, null),
new ClientEncryptorSecrets(config.getMasterPublicKey(), config.getApplicationSecret())
);
ByteArrayOutputStream baosL2 = new ByteArrayOutputStream();
Expand Down Expand Up @@ -255,7 +255,7 @@ public static void recoveryCodeConfirmAndActivationTest(PowerAuthClient powerAut
// Confirm recovery code
ClientEncryptor encryptorConfirmRC = ENCRYPTOR_FACTORY.getClientEncryptor(
EncryptorId.CONFIRM_RECOVERY_CODE,
new EncryptorParameters(version, config.getApplicationKey(), activationId),
new EncryptorParameters(version, config.getApplicationKey(), activationId, null),
new ClientEncryptorSecrets(serverPublicKey, config.getApplicationSecret(), transportMasterKeyBytes)
);
ConfirmRecoveryRequestPayload confirmRequestPayload = new ConfirmRecoveryRequestPayload();
Expand Down Expand Up @@ -307,7 +307,7 @@ private static TokenInfo createToken(PowerAuthClient powerAuthClient, PowerAuthT
final PublicKey serverPublicKey = KEY_CONVERTOR.convertBytesToPublicKey(serverPublicKeyBytes);
final ClientEncryptor clientEncryptor = ENCRYPTOR_FACTORY.getClientEncryptor(
EncryptorId.CREATE_TOKEN,
new EncryptorParameters(version, config.getApplicationKey(), config.getActivationId(version)),
new EncryptorParameters(version, config.getApplicationKey(), config.getActivationId(version), null),
new ClientEncryptorSecrets(serverPublicKey, config.getApplicationSecret(), transportMasterKeyBytes)
);
final EncryptedRequest encryptedRequest = clientEncryptor.encryptRequest("{}".getBytes(StandardCharsets.UTF_8));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ public static void replayAttackEciesDecryptorTest(final PowerAuthClient powerAut
String requestData = "test_data";
ClientEncryptor clientEncryptor = ENCRYPTOR_FACTORY.getClientEncryptor(
EncryptorId.APPLICATION_SCOPE_GENERIC,
new EncryptorParameters(version, config.getApplicationKey(), null),
new EncryptorParameters(version, config.getApplicationKey(), null, null),
new ClientEncryptorSecrets(config.getMasterPublicKey(), config.getApplicationSecret())
);
EncryptedRequest encryptedRequest = clientEncryptor.encryptRequest(requestData.getBytes(StandardCharsets.UTF_8));
Expand Down

0 comments on commit 9d6ef22

Please sign in to comment.