Skip to content

Commit

Permalink
CLI edits
Browse files Browse the repository at this point in the history
  • Loading branch information
mikera committed Jan 29, 2024
1 parent 6a275a0 commit e076ca0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion convex-cli/src/main/java/convex/cli/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 0 additions & 6 deletions convex-cli/src/main/java/convex/cli/key/KeyImport.java
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;

Expand Down
2 changes: 0 additions & 2 deletions convex-core/src/main/java/convex/core/crypto/PEMTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e076ca0

Please sign in to comment.