charon-cmd: Add support for key types other than RSA
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user