vici: Support all defined key types

References #3586.
This commit is contained in:
Tobias Brunner committed 2020-10-27 11:17:21 +01:00
1 parent 7efe92130a
commit 6839256773
2 files changed
+2 -18

No files matched your search

+1 -1
View File
@@ -483,7 +483,7 @@ Load a certificate into the daemon.
Load a private key into the daemon.
{
type = <private key type, rsa|ecdsa|bliss|any>
type = <private key type, rsa|ecdsa|ed25519|ed448|bliss|any>
data = <PEM or DER encoded key data>
} => {
success = <yes or no>
+1 -17
View File
@@ -226,23 +226,7 @@ CALLBACK(load_key, vici_message_t*,
{
return create_reply("key type missing");
}
if (strcaseeq(str, "any"))
{
type = KEY_ANY;
}
else if (strcaseeq(str, "rsa"))
{
type = KEY_RSA;
}
else if (strcaseeq(str, "ecdsa"))
{
type = KEY_ECDSA;
}
else if (strcaseeq(str, "bliss"))
{
type = KEY_BLISS;
}
else
if (!enum_from_name(key_type_names, str, &type))
{
return create_reply("invalid key type: %s", str);
}