feat: reimport picocli
This commit is contained in:
@@ -1,64 +1,67 @@
|
|||||||
package me.hatter.tools.yubikeyca;
|
package me.hatter.tools.yubikeyca;
|
||||||
|
|
||||||
import picocli.CommandLine;
|
import picocli.CommandLine.Command;
|
||||||
|
import picocli.CommandLine.Option;
|
||||||
|
|
||||||
@CommandLine.Command(name = YubikeyCaConstant.NAME, version = YubikeyCaConstant.NAME + " v" + YubikeyCaConstant.VERSION, description = "\n" +
|
@Command(name = YubikeyCaConstant.NAME,
|
||||||
"Yubikey CA tool\n" +
|
version = YubikeyCaConstant.NAME + " v" + YubikeyCaConstant.VERSION,
|
||||||
"\n" +
|
description = "\n" +
|
||||||
"Argument details:")
|
"Yubikey CA tool\n" +
|
||||||
|
"\n" +
|
||||||
|
"Argument details:")
|
||||||
public class YubikeyCaArgs {
|
public class YubikeyCaArgs {
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--generate-keypair"}, description = "Generate keypair")
|
@Option(names = {"--generate-keypair"}, description = "Generate keypair")
|
||||||
boolean generateKeypair = false;
|
boolean generateKeypair = false;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--issue-root-ca"}, description = "Issue root CA")
|
@Option(names = {"--issue-root-ca"}, description = "Issue root CA")
|
||||||
boolean issueRootCa = false;
|
boolean issueRootCa = false;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--issue-intermediate-ca"}, description = "Issue intermediate CA")
|
@Option(names = {"--issue-intermediate-ca"}, description = "Issue intermediate CA")
|
||||||
boolean issueIntermediateCa = false;
|
boolean issueIntermediateCa = false;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--issue-server-ca"}, description = "Issue server CA")
|
@Option(names = {"--issue-server-ca"}, description = "Issue server CA")
|
||||||
boolean issueServerCa = false;
|
boolean issueServerCa = false;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--issue-client-ca"}, description = "Issue client CA")
|
@Option(names = {"--issue-client-ca"}, description = "Issue client CA")
|
||||||
boolean issueClientCa = false;
|
boolean issueClientCa = false;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--subject"}, description = "Certificate subject")
|
@Option(names = {"--subject"}, description = "Certificate subject")
|
||||||
String subject;
|
String subject;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--root-ca-id"}, description = "Root certificate ID")
|
@Option(names = {"--root-ca-id"}, description = "Root certificate ID")
|
||||||
String rootCaId;
|
String rootCaId;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--intermediate-ca-id"}, description = "Intermediate certificate ID")
|
@Option(names = {"--intermediate-ca-id"}, description = "Intermediate certificate ID")
|
||||||
String intermediateCaId;
|
String intermediateCaId;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--dns-name"}, description = "DNS name (Subject alt name)")
|
@Option(names = {"--dns-name"}, description = "DNS name (Subject alt name)")
|
||||||
String[] dnsNames;
|
String[] dnsNames;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--keypair-type"}, description = "Keypair type, e.g." +
|
@Option(names = {"--keypair-type"}, description = "Keypair type, e.g." +
|
||||||
" RSA1024, RSA2048, RSA3072, RSA4096," +
|
" RSA1024, RSA2048, RSA3072, RSA4096," +
|
||||||
" secp192k1, secp192r1, secp224k1, secp256k1," +
|
" secp192k1, secp192r1, secp224k1, secp256k1," +
|
||||||
" secp224r1, secp256r1, secp384r1, secp521r1;")
|
" secp224r1, secp256r1, secp384r1, secp521r1;")
|
||||||
String keypairType;
|
String keypairType;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--sign-slot"}, description = "Slot for sign")
|
@Option(names = {"--sign-slot"}, description = "Slot for sign")
|
||||||
String signSlot;
|
String signSlot;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--cert-slot"}, description = "Slot for cert")
|
@Option(names = {"--cert-slot"}, description = "Slot for cert")
|
||||||
String certSlot;
|
String certSlot;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--pin"}, description = "Yubikey PIV PIN")
|
@Option(names = {"--pin"}, description = "Yubikey PIV PIN")
|
||||||
String pin;
|
String pin;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--memo"}, description = "Memo")
|
@Option(names = {"--memo"}, description = "Memo")
|
||||||
String memo;
|
String memo;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"--add-to-remote"}, description = "Add certificate to remote")
|
@Option(names = {"--add-to-remote"}, description = "Add certificate to remote")
|
||||||
boolean addToRemote = false;
|
boolean addToRemote = false;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"-h", "--help"}, usageHelp = true, description = "Display a help message")
|
@Option(names = {"-h", "--help"}, usageHelp = true, description = "Display a help message")
|
||||||
boolean helpRequested = false;
|
boolean helpRequested = false;
|
||||||
|
|
||||||
@CommandLine.Option(names = {"-V", "--version"}, versionHelp = true, description = "Display a version message")
|
@Option(names = {"-V", "--version"}, versionHelp = true, description = "Display a version message")
|
||||||
boolean versionRequested = false;
|
boolean versionRequested = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user