Skip to content

Commit

Permalink
Revert "fix: sonarQube failure"
Browse files Browse the repository at this point in the history
This reverts commit ebfacbc.
  • Loading branch information
AssahBismarkabah committed Jul 29, 2024
1 parent ebfacbc commit 4680b03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import de.adorsys.datasafe.encrypiton.impl.cmsencryption.decryptors.Decryptor;
import de.adorsys.datasafe.encrypiton.impl.cmsencryption.decryptors.DecryptorFactory;
import de.adorsys.datasafe.encrypiton.impl.cmsencryption.exceptions.DecryptionException;
import de.adorsys.datasafe.encrypiton.impl.utils.ProviderUtils;
import de.adorsys.datasafe.types.api.context.annotations.RuntimeDelegate;
import de.adorsys.keymanagement.adapter.modules.generator.GeneratorModule_ProviderFactory;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
Expand Down Expand Up @@ -145,7 +145,7 @@ private OutputStream streamEncrypt(OutputStream dataContentStream, Set<Recipient

return generator.open(
dataContentStream,
new JceCMSContentEncryptorBuilder(algorithm).setProvider(GeneratorModule_ProviderFactory.provider()).build()
new JceCMSContentEncryptorBuilder(algorithm).setProvider(ProviderUtils.bcProvider).build()
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import de.adorsys.datasafe.encrypiton.api.types.keystore.KeyStoreAuth;
import de.adorsys.datasafe.encrypiton.api.types.keystore.PublicKeyIDWithPublicKey;
import de.adorsys.datasafe.encrypiton.impl.KeystoreUtil;
import de.adorsys.datasafe.encrypiton.impl.utils.ProviderUtils;
import de.adorsys.datasafe.types.api.shared.BaseMockitoTest;
import de.adorsys.datasafe.types.api.types.ReadKeyPassword;
import de.adorsys.datasafe.types.api.types.ReadStorePassword;
import de.adorsys.datasafe.types.api.utils.ReadKeyPasswordTestFactory;
import de.adorsys.keymanagement.adapter.modules.generator.GeneratorModule_ProviderFactory;
import de.adorsys.keymanagement.api.Juggler;
import de.adorsys.keymanagement.api.config.keystore.KeyStoreConfig;
import de.adorsys.keymanagement.api.types.KeySetTemplate;
Expand All @@ -26,6 +26,7 @@
import javax.crypto.SecretKey;
import java.security.KeyStore;
import java.security.PrivateKey;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

Expand Down Expand Up @@ -58,7 +59,7 @@ void createKeyStore() throws Exception {
Assertions.assertEquals(4, list.size());

Assertions.assertEquals("BCFKS", keyStore.getType());
Assertions.assertEquals(GeneratorModule_ProviderFactory.provider(), keyStore.getProvider());
Assertions.assertEquals(ProviderUtils.bcProvider, keyStore.getProvider());
}

@Test
Expand Down

0 comments on commit 4680b03

Please sign in to comment.