pki: Add generic 'priv' key type that loads any type of private key

This commit is contained in:
Tobias Brunner
2016-10-05 11:32:52 +02:00
parent 4a6f97d00b
commit 05ccde0a8b
12 changed files with 59 additions and 28 deletions
+6 -1
View File
@@ -89,6 +89,11 @@ static int print()
type = CRED_CERTIFICATE;
subtype = CERT_TRUSTED_PUBKEY;
}
else if (streq(arg, "priv"))
{
type = CRED_PRIVATE_KEY;
subtype = KEY_ANY;
}
else if (streq(arg, "rsa") ||
streq(arg, "rsa-priv"))
{
@@ -176,7 +181,7 @@ static void __attribute__ ((constructor))reg()
command_register((command_t)
{ print, 'a', "print",
"print a credential in a human readable form",
{"[--in file] [--type x509|crl|ac|pub|rsa|ecdsa|bliss]"},
{"[--in file] [--type x509|crl|ac|pub|priv|rsa|ecdsa|bliss]"},
{
{"help", 'h', 0, "show usage information"},
{"in", 'i', 1, "input file, default: stdin"},