Skip to content

Commit

Permalink
Merge pull request kroxylicious#1424 from robobario/cipher-logger
Browse files Browse the repository at this point in the history
record-encryption: log details about Cipher origin
  • Loading branch information
robobario authored Aug 13, 2024
2 parents 74b1b82 + 175e8a3 commit 007616a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@

package io.kroxylicious.filter.encryption;

import java.security.Provider;
import java.time.Duration;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadLocalRandom;
Expand Down Expand Up @@ -82,7 +84,9 @@ private static void checkCipherSuite() {
/* exposed for testing */ static void checkCipherSuite(Function<CipherManager, Cipher> cipherFunc) {
List<CipherSpec> failures = Arrays.stream(CipherSpec.values()).flatMap(cipherSpec -> {
try {
cipherFunc.apply(CipherSpecResolver.ALL.fromName(cipherSpec));
Cipher cipher = cipherFunc.apply(CipherSpecResolver.ALL.fromName(cipherSpec));
String provider = Optional.ofNullable(cipher.getProvider()).map(Provider::getName).orElse("(no provider)");
LOGGER.info("Loaded Cipher {} from provider {} for CipherSpec {}", cipher, provider, cipherSpec);
return Stream.empty();
}
catch (Exception e) {
Expand Down

0 comments on commit 007616a

Please sign in to comment.