charon-cmd: Add support for key types other than RSA
This commit is contained in:
@@ -95,6 +95,10 @@ options can be used.
|
|||||||
.TP
|
.TP
|
||||||
.BI "\-\-rsa " path
|
.BI "\-\-rsa " path
|
||||||
RSA private key to use for authentication (if a password is required, it will
|
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).
|
be requested on demand).
|
||||||
.TP
|
.TP
|
||||||
.BI "\-\-p12 " path
|
.BI "\-\-p12 " path
|
||||||
|
|||||||
@@ -499,6 +499,7 @@ METHOD(cmd_connection_t, handle, bool,
|
|||||||
this->xautheap = arg;
|
this->xautheap = arg;
|
||||||
break;
|
break;
|
||||||
case CMD_OPT_RSA:
|
case CMD_OPT_RSA:
|
||||||
|
case CMD_OPT_PRIV:
|
||||||
case CMD_OPT_AGENT:
|
case CMD_OPT_AGENT:
|
||||||
case CMD_OPT_PKCS12:
|
case CMD_OPT_PKCS12:
|
||||||
this->key_seen = TRUE;
|
this->key_seen = TRUE;
|
||||||
|
|||||||
@@ -237,6 +237,9 @@ METHOD(cmd_creds_t, handle, bool,
|
|||||||
case CMD_OPT_RSA:
|
case CMD_OPT_RSA:
|
||||||
load_key(this, KEY_RSA, arg);
|
load_key(this, KEY_RSA, arg);
|
||||||
break;
|
break;
|
||||||
|
case CMD_OPT_PRIV:
|
||||||
|
load_key(this, KEY_ANY, arg);
|
||||||
|
break;
|
||||||
case CMD_OPT_PKCS12:
|
case CMD_OPT_PKCS12:
|
||||||
load_pkcs12(this, arg);
|
load_pkcs12(this, arg);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ cmd_option_t cmd_options[CMD_OPT_COUNT] = {
|
|||||||
"certificate for authentication or trust chain validation", {}},
|
"certificate for authentication or trust chain validation", {}},
|
||||||
{ CMD_OPT_RSA, "rsa", required_argument, "path",
|
{ CMD_OPT_RSA, "rsa", required_argument, "path",
|
||||||
"RSA private key to use for authentication", {}},
|
"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",
|
{ CMD_OPT_PKCS12, "p12", required_argument, "path",
|
||||||
"PKCS#12 file with private key and certificates to use for ", {
|
"PKCS#12 file with private key and certificates to use for ", {
|
||||||
"authentication and trust chain validation"
|
"authentication and trust chain validation"
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ enum cmd_option_type_t {
|
|||||||
CMD_OPT_REMOTE_IDENTITY,
|
CMD_OPT_REMOTE_IDENTITY,
|
||||||
CMD_OPT_CERT,
|
CMD_OPT_CERT,
|
||||||
CMD_OPT_RSA,
|
CMD_OPT_RSA,
|
||||||
|
CMD_OPT_PRIV,
|
||||||
CMD_OPT_PKCS12,
|
CMD_OPT_PKCS12,
|
||||||
CMD_OPT_AGENT,
|
CMD_OPT_AGENT,
|
||||||
CMD_OPT_LOCAL_TS,
|
CMD_OPT_LOCAL_TS,
|
||||||
|
|||||||
Reference in New Issue
Block a user