Add logging output to indicate to the user a private key has been
locked (encrypted).
@@ -6,6 +6,8 @@ import com.quorum.tessera.config.util.JaxbUtil;
import com.quorum.tessera.config.util.PasswordReader;
import com.quorum.tessera.nacl.KeyPair;
import com.quorum.tessera.nacl.NaclFacade;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.ByteArrayOutputStream;
import java.nio.file.Files;
@@ -21,6 +23,8 @@ import static java.nio.charset.StandardCharsets.UTF_8;
public class KeyGeneratorImpl implements KeyGenerator {
+ private static final Logger LOGGER = LoggerFactory.getLogger(KeyGeneratorImpl.class);
+
private static final String EMPTY_FILENAME = "";
private final NaclFacade nacl;
@@ -77,6 +81,8 @@ public class KeyGeneratorImpl implements KeyGenerator {
null
);
+ LOGGER.info("Newly generated private key has been encrypted");
+
} else {
finalKeys = new KeyData(
