aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-11-15 10:34:30 +0000
committerWerner Koch <[email protected]>2017-11-15 10:34:30 +0000
commit166f3f9ec40888e10cb0c51017944bfc57503fc1 (patch)
tree0ab7bde45edb9c51dc6706febb9da2bfce8c8661
parentMerge branch 'STABLE-BRANCH-2-2' (diff)
downloadgnupg-166f3f9ec40888e10cb0c51017944bfc57503fc1.tar.gz
gnupg-166f3f9ec40888e10cb0c51017944bfc57503fc1.zip
gpg: Repurpose the ISO defined DO "sex" to "salutation".
* g10/card-util.c (current_card_status): String changes. (change_sex): Description change. (cmds): Add "salutation"; keep "sex" as an alias. -- Note that we can't change the used values or tags but at least the UI should show reflect the real purpose of the field. Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--g10/card-util.c13
-rw-r--r--scd/app-openpgp.c2
2 files changed, 8 insertions, 7 deletions
diff --git a/g10/card-util.c b/g10/card-util.c
index 8a03a26cf..854b94f47 100644
--- a/g10/card-util.c
+++ b/g10/card-util.c
@@ -531,9 +531,9 @@ current_card_status (ctrl_t ctrl, estream_t fp,
print_isoname (fp, "Name of cardholder: ", "name", info.disp_name);
print_name (fp, "Language prefs ...: ", info.disp_lang);
- tty_fprintf (fp, "Sex ..............: %s\n",
- info.disp_sex == 1? _("male"):
- info.disp_sex == 2? _("female") : _("unspecified"));
+ tty_fprintf (fp, "Salutation .......: %s\n",
+ info.disp_sex == 1? _("Mr."):
+ info.disp_sex == 2? _("Mrs.") : "");
print_name (fp, "URL of public key : ", info.pubkey_url);
print_name (fp, "Login data .......: ", info.login_data);
if (info.private_do[0])
@@ -1088,7 +1088,7 @@ change_sex (void)
int rc;
data = cpr_get ("cardedit.change_sex",
- _("Sex ((M)ale, (F)emale or space): "));
+ _("Salutation (M = Mr., F = Mrs., or space): "));
if (!data)
return -1;
trim_spaces (data);
@@ -1109,7 +1109,7 @@ change_sex (void)
rc = agent_scd_setattr ("DISP-SEX", str, 1, NULL );
if (rc)
- log_error ("error setting sex: %s\n", gpg_strerror (rc));
+ log_error ("error setting salutation: %s\n", gpg_strerror (rc));
xfree (data);
write_sc_op_status (rc);
return rc;
@@ -1891,7 +1891,8 @@ static struct
{ "fetch" , cmdFETCH , 0, N_("fetch the key specified in the card URL")},
{ "login" , cmdLOGIN , 1, N_("change the login name")},
{ "lang" , cmdLANG , 1, N_("change the language preferences")},
- { "sex" , cmdSEX , 1, N_("change card holder's sex")},
+ { "salutation",cmdSEX , 1, N_("change card holder's salutation")},
+ { "sex" ,cmdSEX , 1, NULL }, /* Backward compatibility. */
{ "cafpr" , cmdCAFPR , 1, N_("change a CA fingerprint")},
{ "forcesig", cmdFORCESIG, 1, N_("toggle the signature force PIN flag")},
{ "generate", cmdGENERATE, 1, N_("generate new keys")},
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 6fcec3e4e..e9eca4920 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -98,7 +98,7 @@ static struct {
{ 0x0065, 1, 0, 1, 0, 0, 0, 0, "Cardholder Related Data"},
{ 0x005B, 0, 0x65, 0, 0, 0, 0, 0, "Name" },
{ 0x5F2D, 0, 0x65, 0, 0, 0, 0, 0, "Language preferences" },
- { 0x5F35, 0, 0x65, 0, 0, 0, 0, 0, "Sex" },
+ { 0x5F35, 0, 0x65, 0, 0, 0, 0, 0, "Salutation" },
{ 0x006E, 1, 0, 1, 0, 0, 0, 0, "Application Related Data" },
{ 0x004F, 0, 0x6E, 1, 0, 0, 0, 0, "AID" },
{ 0x0073, 1, 0, 1, 0, 0, 0, 0, "Discretionary Data Objects" },