diff --git a/convex-cli/src/main/java/convex/cli/Main.java b/convex-cli/src/main/java/convex/cli/Main.java index 3661f089a..d1ac4c605 100644 --- a/convex-cli/src/main/java/convex/cli/Main.java +++ b/convex-cli/src/main/java/convex/cli/Main.java @@ -455,7 +455,7 @@ public boolean isInteractive() { public char[] readPassword(String prompt) { Console c=System.console(); - if (c==null) throw new CLIError("Unable to get user input because console is unavaiable."); + if (c==null) throw new CLIError("Unable to request password because console is unavaiable. Consider passing a password parameter, or running in interactive mode."); return c.readPassword(prompt); } diff --git a/convex-cli/src/main/java/convex/cli/key/KeyImport.java b/convex-cli/src/main/java/convex/cli/key/KeyImport.java index 2317e405d..7f4c37887 100644 --- a/convex-cli/src/main/java/convex/cli/key/KeyImport.java +++ b/convex-cli/src/main/java/convex/cli/key/KeyImport.java @@ -1,12 +1,8 @@ package convex.cli.key; -import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; -import java.security.spec.InvalidKeySpecException; import org.bouncycastle.util.Arrays; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import convex.cli.CLIError; import convex.core.crypto.AKeyPair; @@ -32,8 +28,6 @@ description="Import key pairs to the keystore.") public class KeyImport extends AKeyCommand { - private static final Logger log = LoggerFactory.getLogger(KeyImport.class); - @ParentCommand protected Key keyParent; diff --git a/convex-core/src/main/java/convex/core/crypto/PEMTools.java b/convex-core/src/main/java/convex/core/crypto/PEMTools.java index 8f1dd9e98..7fc3642da 100644 --- a/convex-core/src/main/java/convex/core/crypto/PEMTools.java +++ b/convex-core/src/main/java/convex/core/crypto/PEMTools.java @@ -7,12 +7,10 @@ import java.security.KeyFactory; import java.security.PrivateKey; import java.security.PublicKey; -import java.security.Security; import java.security.spec.PKCS8EncodedKeySpec; import java.util.Base64; import org.bouncycastle.asn1.pkcs.PrivateKeyInfo; -import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.openssl.PEMParser; import org.bouncycastle.openssl.PKCS8Generator; import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter;