Commit 8ed0e50f authored by Jiří Klimeš's avatar Jiří Klimeš

cli: add description for certificate properties in editor (rh #1182575)

parent 564b462d
......@@ -2759,6 +2759,15 @@ DEFINE_REMOVER_INDEX_OR_VALUE (nmc_property_802_1X_remove_eap,
/* 'ca-cert' */
DEFINE_SETTER_CERT (nmc_property_802_1X_set_ca_cert, nm_setting_802_1x_set_ca_cert)
static const char *
nmc_property_802_1X_describe_ca_cert (NMSetting *setting, const char *prop)
{
return _("Enter file path to CA certificate (optionally prefixed with file://).\n"
" [file://]<file path>\n"
"Note that nmcli does not support specifying certificates as raw blob data.\n"
"Example: /home/cimrman/cacert.crt\n");
}
/* 'altsubject-matches' */
DEFINE_SETTER_STR_LIST (nmc_property_802_1X_set_altsubject_matches, nm_setting_802_1x_add_altsubject_match)
......@@ -2785,9 +2794,28 @@ DEFINE_REMOVER_INDEX_OR_VALUE (nmc_property_802_1X_remove_altsubject_matches,
/* 'client-cert' */
DEFINE_SETTER_CERT (nmc_property_802_1X_set_client_cert, nm_setting_802_1x_set_client_cert)
static const char *
nmc_property_802_1X_describe_client_cert (NMSetting *setting, const char *prop)
{
return _("Enter file path to client certificate (optionally prefixed with file://).\n"
" [file://]<file path>\n"
"Note that nmcli does not support specifying certificates as raw blob data.\n"
"Example: /home/cimrman/jara.crt\n");
}
/* 'phase2-ca-cert' */
DEFINE_SETTER_CERT (nmc_property_802_1X_set_phase2_ca_cert, nm_setting_802_1x_set_phase2_ca_cert)
static const char *
nmc_property_802_1X_describe_phase2_ca_cert (NMSetting *setting, const char *prop)
{
return _("Enter file path to CA certificate for inner authentication (optionally prefixed\n"
"with file://).\n"
" [file://]<file path>\n"
"Note that nmcli does not support specifying certificates as raw blob data.\n"
"Example: /home/cimrman/ca-zweite-phase.crt\n");
}
/* 'phase2-altsubject-matches' */
DEFINE_SETTER_STR_LIST (nmc_property_802_1X_set_phase2_altsubject_matches, nm_setting_802_1x_add_phase2_altsubject_match)
......@@ -2814,6 +2842,16 @@ DEFINE_REMOVER_INDEX_OR_VALUE (nmc_property_802_1X_remove_phase2_altsubject_matc
/* 'phase2-client-cert' */
DEFINE_SETTER_CERT (nmc_property_802_1X_set_phase2_client_cert, nm_setting_802_1x_set_phase2_client_cert)
static const char *
nmc_property_802_1X_describe_phase2_client_cert (NMSetting *setting, const char *prop)
{
return _("Enter file path to client certificate for inner authentication (optionally prefixed\n"
"with file://).\n"
" [file://]<file path>\n"
"Note that nmcli does not support specifying certificates as raw blob data.\n"
"Example: /home/cimrman/jara-zweite-phase.crt\n");
}
/* 'private-key' */
DEFINE_SETTER_PRIV_KEY (nmc_property_802_1X_set_private_key,
nm_setting_802_1x_get_private_key_password,
......@@ -2828,7 +2866,8 @@ static const char *
nmc_property_802_1X_describe_private_key (NMSetting *setting, const char *prop)
{
return _("Enter path to a private key and the key password (if not set yet):\n"
" <file path> [<password>]\n"
" [file://]<file path> [<password>]\n"
"Note that nmcli does not support specifying private key as raw blob data.\n"
"Example: /home/cimrman/jara-priv-key Dardanely\n");
}
......@@ -4750,7 +4789,7 @@ nmc_properties_init (void)
nmc_property_802_1X_get_ca_cert,
nmc_property_802_1X_set_ca_cert,
NULL,
NULL,
nmc_property_802_1X_describe_ca_cert,
NULL,
NULL);
nmc_add_prop_funcs (GLUE (802_1X, CA_PATH),
......@@ -4778,7 +4817,7 @@ nmc_properties_init (void)
nmc_property_802_1X_get_client_cert,
nmc_property_802_1X_set_client_cert,
NULL,
NULL,
nmc_property_802_1X_describe_client_cert,
NULL,
NULL);
nmc_add_prop_funcs (GLUE (802_1X, PHASE1_PEAPVER),
......@@ -4820,7 +4859,7 @@ nmc_properties_init (void)
nmc_property_802_1X_get_phase2_ca_cert,
nmc_property_802_1X_set_phase2_ca_cert,
NULL,
NULL,
nmc_property_802_1X_describe_phase2_ca_cert,
NULL,
NULL);
nmc_add_prop_funcs (GLUE (802_1X, PHASE2_CA_PATH),
......@@ -4848,7 +4887,7 @@ nmc_properties_init (void)
nmc_property_802_1X_get_phase2_client_cert,
nmc_property_802_1X_set_phase2_client_cert,
NULL,
NULL,
nmc_property_802_1X_describe_phase2_client_cert,
NULL,
NULL);
nmc_add_prop_funcs (GLUE (802_1X, PASSWORD),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment