pki: Drop -priv suffix to specify private key types
This commit is contained in:
@@ -42,17 +42,20 @@ static int keyid()
|
|||||||
case 'h':
|
case 'h':
|
||||||
return command_usage(NULL);
|
return command_usage(NULL);
|
||||||
case 't':
|
case 't':
|
||||||
if (streq(arg, "rsa-priv"))
|
if (streq(arg, "rsa") ||
|
||||||
|
streq(arg, "rsa-priv"))
|
||||||
{
|
{
|
||||||
type = CRED_PRIVATE_KEY;
|
type = CRED_PRIVATE_KEY;
|
||||||
subtype = KEY_RSA;
|
subtype = KEY_RSA;
|
||||||
}
|
}
|
||||||
else if (streq(arg, "ecdsa-priv"))
|
else if (streq(arg, "ecdsa") ||
|
||||||
|
streq(arg, "ecdsa-priv"))
|
||||||
{
|
{
|
||||||
type = CRED_PRIVATE_KEY;
|
type = CRED_PRIVATE_KEY;
|
||||||
subtype = KEY_ECDSA;
|
subtype = KEY_ECDSA;
|
||||||
}
|
}
|
||||||
else if (streq(arg, "bliss-priv"))
|
else if (streq(arg, "bliss") ||
|
||||||
|
streq(arg, "bliss-priv"))
|
||||||
{
|
{
|
||||||
type = CRED_PRIVATE_KEY;
|
type = CRED_PRIVATE_KEY;
|
||||||
subtype = KEY_BLISS;
|
subtype = KEY_BLISS;
|
||||||
@@ -169,11 +172,11 @@ static void __attribute__ ((constructor))reg()
|
|||||||
command_register((command_t)
|
command_register((command_t)
|
||||||
{ keyid, 'k', "keyid",
|
{ keyid, 'k', "keyid",
|
||||||
"calculate key identifiers of a key/certificate",
|
"calculate key identifiers of a key/certificate",
|
||||||
{"[--in file] [--type rsa-priv|ecdsa-priv|bliss-priv|pub|pkcs10|x509]"},
|
{"[--in file] [--type rsa|ecdsa|bliss|pub|pkcs10|x509]"},
|
||||||
{
|
{
|
||||||
{"help", 'h', 0, "show usage information"},
|
{"help", 'h', 0, "show usage information"},
|
||||||
{"in", 'i', 1, "input file, default: stdin"},
|
{"in", 'i', 1, "input file, default: stdin"},
|
||||||
{"type", 't', 1, "type of key, default: rsa-priv"},
|
{"type", 't', 1, "type of key, default: rsa"},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,17 +89,20 @@ static int print()
|
|||||||
type = CRED_CERTIFICATE;
|
type = CRED_CERTIFICATE;
|
||||||
subtype = CERT_TRUSTED_PUBKEY;
|
subtype = CERT_TRUSTED_PUBKEY;
|
||||||
}
|
}
|
||||||
else if (streq(arg, "rsa-priv"))
|
else if (streq(arg, "rsa") ||
|
||||||
|
streq(arg, "rsa-priv"))
|
||||||
{
|
{
|
||||||
type = CRED_PRIVATE_KEY;
|
type = CRED_PRIVATE_KEY;
|
||||||
subtype = KEY_RSA;
|
subtype = KEY_RSA;
|
||||||
}
|
}
|
||||||
else if (streq(arg, "ecdsa-priv"))
|
else if (streq(arg, "ecdsa") ||
|
||||||
|
streq(arg, "ecdsa-priv"))
|
||||||
{
|
{
|
||||||
type = CRED_PRIVATE_KEY;
|
type = CRED_PRIVATE_KEY;
|
||||||
subtype = KEY_ECDSA;
|
subtype = KEY_ECDSA;
|
||||||
}
|
}
|
||||||
else if (streq(arg, "bliss-priv"))
|
else if (streq(arg, "bliss") ||
|
||||||
|
streq(arg, "bliss-priv"))
|
||||||
{
|
{
|
||||||
type = CRED_PRIVATE_KEY;
|
type = CRED_PRIVATE_KEY;
|
||||||
subtype = KEY_BLISS;
|
subtype = KEY_BLISS;
|
||||||
@@ -173,7 +176,7 @@ static void __attribute__ ((constructor))reg()
|
|||||||
command_register((command_t)
|
command_register((command_t)
|
||||||
{ print, 'a', "print",
|
{ print, 'a', "print",
|
||||||
"print a credential in a human readable form",
|
"print a credential in a human readable form",
|
||||||
{"[--in file] [--type rsa-priv|ecdsa-priv|bliss-priv|pub|x509|crl|ac]"},
|
{"[--in file] [--type x509|crl|ac|pub|rsa|ecdsa|bliss]"},
|
||||||
{
|
{
|
||||||
{"help", 'h', 0, "show usage information"},
|
{"help", 'h', 0, "show usage information"},
|
||||||
{"in", 'i', 1, "input file, default: stdin"},
|
{"in", 'i', 1, "input file, default: stdin"},
|
||||||
|
|||||||
@@ -44,9 +44,10 @@ Read command line options from \fIfile\fR.
|
|||||||
Input file. If not given the input is read from \fISTDIN\fR.
|
Input file. If not given the input is read from \fISTDIN\fR.
|
||||||
.TP
|
.TP
|
||||||
.BI "\-t, \-\-type " type
|
.BI "\-t, \-\-type " type
|
||||||
Type of input. One of \fIrsa-priv\fR (RSA private key), \fIecdsa-priv\fR (ECDSA
|
Type of input. One of \fIrsa\fR (RSA private key), \fIecdsa\fR (ECDSA
|
||||||
private key), \fIpub\fR (public key), \fIpkcs10\fR (PKCS#10 certificate
|
private key), \fIbliss\fR (BLISS private key), \fIpub\fR (public key),
|
||||||
request), \fIx509\fR (X.509 certificate), defaults to \fIrsa-priv\fR.
|
\fIpkcs10\fR (PKCS#10 certificate request), \fIx509\fR (X.509 certificate),
|
||||||
|
defaults to \fIrsa\fR.
|
||||||
.
|
.
|
||||||
.SH "EXAMPLES"
|
.SH "EXAMPLES"
|
||||||
.
|
.
|
||||||
|
|||||||
@@ -44,10 +44,10 @@ Read command line options from \fIfile\fR.
|
|||||||
Input file. If not given the input is read from \fISTDIN\fR.
|
Input file. If not given the input is read from \fISTDIN\fR.
|
||||||
.TP
|
.TP
|
||||||
.BI "\-t, \-\-type " type
|
.BI "\-t, \-\-type " type
|
||||||
Type of input. One of \fIrsa-priv\fR (RSA private key), \fIecdsa-priv\fR (ECDSA
|
Type of input. One of \fIx509\fR (X.509 certificate), \fIcrl\fR (Certificate
|
||||||
private key), \fIpub\fR (public key), \fIx509\fR (X.509 certificate), \fIcrl\fR
|
Revocation List, CRL), \fIac\fR (Attribute Certificate), \fIpub\fR (public key),
|
||||||
(Certificate Revocation List, CRL), \fIac\fR (Attribute Certificate),
|
\fIrsa\fR (RSA private key), \fIecdsa\fR (ECDSA private key), \fIbliss\fR (BLISS
|
||||||
defaults to \fIx509\fR.
|
private key), defaults to \fIx509\fR.
|
||||||
.
|
.
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.
|
.
|
||||||
|
|||||||
Reference in New Issue
Block a user