pub enum Subcommand {
Show 16 variants
Ping(Ping),
ListProviders(ListProviders),
ListAuthenticators(ListAuthenticators),
ListOpcodes(ListOpcodes),
ListKeys(ListKeys),
GenerateRandom(GenerateRandom),
ExportPublicKey(ExportPublicKey),
CreateRsaKey(CreateRsaKey),
CreateEccKey(CreateEccKey),
Decrypt(Decrypt),
Sign(Sign),
DeleteKey(DeleteKey),
ListClients(ListClients),
DeleteClient(DeleteClient),
CreateCsr(CreateCsr),
Encrypt(Encrypt),
}
Expand description
Command-line interface to Parsec operations.
Variants§
Ping(Ping)
Ping the Parsec service and prints the wire protocol version.
ListProviders(ListProviders)
List the available providers supported by the Parsec service.
ListAuthenticators(ListAuthenticators)
List the available authenticators supported by the Parsec service.
ListOpcodes(ListOpcodes)
List the supported opcodes for a given provider.
ListKeys(ListKeys)
List all keys belonging to the application.
GenerateRandom(GenerateRandom)
Generate a sequence of random bytes.
ExportPublicKey(ExportPublicKey)
Export the public part of the key pair in PEM format
CreateRsaKey(CreateRsaKey)
Create a RSA key pair (2048 bits). Used by default for asymmetric encryption with RSA PKCS#1 v1.5.
CreateEccKey(CreateEccKey)
Create a ECC key pair (curve secp256r1). Used by default for asymmetric signing with ECDSA (SHA-256).
Decrypt(Decrypt)
Decrypt data using the algorithm of the key
Sign(Sign)
Sign data using the algorithm of the key (base64 signature)
DeleteKey(DeleteKey)
Delete a key.
ListClients(ListClients)
Lists all clients currently having data in the service (admin operation).
DeleteClient(DeleteClient)
Delete all data a client has in the service (admin operation).
CreateCsr(CreateCsr)
Create a Certificate Signing Request (CSR) from a keypair.
Encrypt(Encrypt)
Encrypt data using the algorithm of the key
Implementations§
Source§impl Subcommand
impl Subcommand
Sourcepub fn run(&self, client: BasicClient) -> Result<()>
pub fn run(&self, client: BasicClient) -> Result<()>
Runs the subcommand.
Sourcepub fn create_client(&self, app_name: Option<String>) -> Result<BasicClient>
pub fn create_client(&self, app_name: Option<String>) -> Result<BasicClient>
Get BasicClient for operation
Trait Implementations§
Source§impl Debug for Subcommand
impl Debug for Subcommand
Source§impl StructOpt for Subcommand
impl StructOpt for Subcommand
Source§fn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
clap::ArgMatches
. It’s guaranteed to succeed
if matches
originates from an App
generated by StructOpt::clap
called on
the same type, otherwise it must panic.Source§fn from_args() -> Selfwhere
Self: Sized,
fn from_args() -> Selfwhere
Self: Sized,
std::env::args_os
).
Calls clap::Error::exit
on failure, printing the error message and aborting the program.Source§fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
std::env::args_os
).
Unlike StructOpt::from_args
, returns clap::Error
on failure instead of aborting the program,
so calling .exit
is up to you.Source§fn from_iter<I>(iter: I) -> Self
fn from_iter<I>(iter: I) -> Self
Vec
of your making.
Print the error message and quit the program in case of failure. Read more