diff options
| author | Werner Koch <[email protected]> | 2009-03-26 11:33:53 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2009-03-26 11:33:53 +0000 |
| commit | 6e63e54b0047bbf9379eedca0b388a56a0ec7b12 (patch) | |
| tree | 08e308c760e6e82444839fc8f88148b4dbd6a96a /sm/call-agent.c | |
| parent | Print NO_SECKEY status line in gpgsm. (diff) | |
| download | gnupg-6e63e54b0047bbf9379eedca0b388a56a0ec7b12.tar.gz gnupg-6e63e54b0047bbf9379eedca0b388a56a0ec7b12.zip | |
Fixed a trustlist update problem.
Pretty format the marktrusted pinentry prompt.
Diffstat (limited to 'sm/call-agent.c')
| -rw-r--r-- | sm/call-agent.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sm/call-agent.c b/sm/call-agent.c index 3616ea936..1f8eecb3b 100644 --- a/sm/call-agent.c +++ b/sm/call-agent.c @@ -612,7 +612,7 @@ int gpgsm_agent_marktrusted (ctrl_t ctrl, ksba_cert_t cert) { int rc; - char *fpr, *dn; + char *fpr, *dn, *dnfmt; char line[ASSUAN_LINELENGTH]; rc = start_agent (ctrl); @@ -632,9 +632,13 @@ gpgsm_agent_marktrusted (ctrl_t ctrl, ksba_cert_t cert) xfree (fpr); return gpg_error (GPG_ERR_GENERAL); } - snprintf (line, DIM(line)-1, "MARKTRUSTED %s S %s", fpr, dn); + dnfmt = gpgsm_format_name2 (dn, 0); + xfree (dn); + if (!dnfmt) + return gpg_error_from_syserror (); + snprintf (line, DIM(line)-1, "MARKTRUSTED %s S %s", fpr, dnfmt); line[DIM(line)-1] = 0; - ksba_free (dn); + ksba_free (dnfmt); xfree (fpr); rc = assuan_transact (agent_ctx, line, NULL, NULL, |
