Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelandis committed Nov 10, 2023
1 parent e7d31d0 commit f5d67a5
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1417,13 +1417,11 @@ private Encrypter getEncrypter(Tuple<X509Certificate, PrivateKey> keyPair) throw
final Credential keyEncryptionCredential = new BasicCredential(keyPair.v1().getPublicKey(), keyPair.v2());
KeyEncryptionParameters keyEncryptionParameters = new KeyEncryptionParameters();
keyEncryptionParameters.setEncryptionCredential(keyEncryptionCredential);
if(inFipsJvm()){
keyEncryptionParameters.setAlgorithm(
randomFrom(EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSAOAEP)
);
if (inFipsJvm()) {
keyEncryptionParameters.setAlgorithm(randomFrom(EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSAOAEP));
} else {
keyEncryptionParameters.setAlgorithm(
randomFrom(EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSAOAEP, EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSA15)
randomFrom(EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSAOAEP, EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSA15)
);
}

Expand Down

0 comments on commit f5d67a5

Please sign in to comment.