charon-cmd: Add support for key types other than RSA

This commit is contained in:
Tobias Brunner
2023-11-13 12:26:07 +01:00
parent 799511d90f
commit 8581a19dd7
5 changed files with 11 additions and 0 deletions
+4
View File
@@ -95,6 +95,10 @@ options can be used.
.TP
.BI "\-\-rsa " path
RSA private key to use for authentication (if a password is required, it will
be requested on demand). For other key types use \fI\-\-priv\fR.
.TP
.BI "\-\-priv " path
Pivate key to use for authentication (if a password is required, it will
be requested on demand).
.TP
.BI "\-\-p12 " path
+1
View File
@@ -499,6 +499,7 @@ METHOD(cmd_connection_t, handle, bool,
this->xautheap = arg;
break;
case CMD_OPT_RSA:
case CMD_OPT_PRIV:
case CMD_OPT_AGENT:
case CMD_OPT_PKCS12:
this->key_seen = TRUE;
+3
View File
@@ -237,6 +237,9 @@ METHOD(cmd_creds_t, handle, bool,
case CMD_OPT_RSA:
load_key(this, KEY_RSA, arg);
break;
case CMD_OPT_PRIV:
load_key(this, KEY_ANY, arg);
break;
case CMD_OPT_PKCS12:
load_pkcs12(this, arg);
break;
+2
View File
@@ -43,6 +43,8 @@ cmd_option_t cmd_options[CMD_OPT_COUNT] = {
"certificate for authentication or trust chain validation", {}},
{ CMD_OPT_RSA, "rsa", required_argument, "path",
"RSA private key to use for authentication", {}},
{ CMD_OPT_PRIV, "priv", required_argument, "path",
"Private key to use for authentication", {}},
{ CMD_OPT_PKCS12, "p12", required_argument, "path",
"PKCS#12 file with private key and certificates to use for ", {
"authentication and trust chain validation"
+1
View File
@@ -40,6 +40,7 @@ enum cmd_option_type_t {
CMD_OPT_REMOTE_IDENTITY,
CMD_OPT_CERT,
CMD_OPT_RSA,
CMD_OPT_PRIV,
CMD_OPT_PKCS12,
CMD_OPT_AGENT,
CMD_OPT_LOCAL_TS,