From 9d6ef22e713872d5784edc745ed3a3f6c0e2c8a1 Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Tue, 3 Sep 2024 07:46:37 +0200 Subject: [PATCH] Fix #502: Unable to compile after adding support for temporary keys --- .../powerauth/test/shared/PowerAuthApiShared.java | 8 ++++---- .../powerauth/test/shared/PowerAuthEncryptionShared.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/powerauth-backend-tests/src/test/java/com/wultra/security/powerauth/test/shared/PowerAuthApiShared.java b/powerauth-backend-tests/src/test/java/com/wultra/security/powerauth/test/shared/PowerAuthApiShared.java index 4d5d5b1c..acf08544 100644 --- a/powerauth-backend-tests/src/test/java/com/wultra/security/powerauth/test/shared/PowerAuthApiShared.java +++ b/powerauth-backend-tests/src/test/java/com/wultra/security/powerauth/test/shared/PowerAuthApiShared.java @@ -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(); @@ -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(); @@ -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(); @@ -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)); diff --git a/powerauth-backend-tests/src/test/java/com/wultra/security/powerauth/test/shared/PowerAuthEncryptionShared.java b/powerauth-backend-tests/src/test/java/com/wultra/security/powerauth/test/shared/PowerAuthEncryptionShared.java index 9ea52589..efdf1d82 100644 --- a/powerauth-backend-tests/src/test/java/com/wultra/security/powerauth/test/shared/PowerAuthEncryptionShared.java +++ b/powerauth-backend-tests/src/test/java/com/wultra/security/powerauth/test/shared/PowerAuthEncryptionShared.java @@ -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));