mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Fixed an email/DN bug.
Changed pinentry prompts.
This commit is contained in:
parent
fa800e7c86
commit
6a78bca874
34 changed files with 2113 additions and 1964 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-03-13 Werner Koch <wk@g10code.com>
|
||||
|
||||
* certdump.c (gpgsm_fpr_and_name_for_status): Fix signed/unsigned
|
||||
char issue.
|
||||
(gpgsm_format_keydesc): Remove superfluous test. Add expire date
|
||||
to the prompt.
|
||||
|
||||
2008-02-18 Werner Koch <wk@g10code.com>
|
||||
|
||||
* certchain.c (gpgsm_is_root_cert): Factor code out to ...
|
||||
|
|
|
@ -890,14 +890,14 @@ gpgsm_fpr_and_name_for_status (ksba_cert_t cert)
|
|||
buffer = xtrymalloc (strlen (fpr) + 1 + 3*strlen (name) + 1);
|
||||
if (buffer)
|
||||
{
|
||||
const unsigned char *s;
|
||||
const char *s;
|
||||
|
||||
p = stpcpy (stpcpy (buffer, fpr), " ");
|
||||
for (s = name; *s; s++)
|
||||
{
|
||||
if (*s < ' ')
|
||||
{
|
||||
sprintf (p, "%%%02X", *s);
|
||||
sprintf (p, "%%%02X", *(const unsigned char*)s);
|
||||
p += 3;
|
||||
}
|
||||
else
|
||||
|
@ -922,6 +922,7 @@ gpgsm_format_keydesc (ksba_cert_t cert)
|
|||
const char *s;
|
||||
ksba_isotime_t t;
|
||||
char created[20];
|
||||
char expires[20];
|
||||
char *sn;
|
||||
ksba_sexp_t sexp;
|
||||
char *orig_codeset;
|
||||
|
@ -935,22 +936,28 @@ gpgsm_format_keydesc (ksba_cert_t cert)
|
|||
ksba_free (sexp);
|
||||
|
||||
ksba_cert_get_validity (cert, 0, t);
|
||||
if (t && *t)
|
||||
if (*t)
|
||||
sprintf (created, "%.4s-%.2s-%.2s", t, t+4, t+6);
|
||||
else
|
||||
*created = 0;
|
||||
ksba_cert_get_validity (cert, 1, t);
|
||||
if (*t)
|
||||
sprintf (expires, "%.4s-%.2s-%.2s", t, t+4, t+6);
|
||||
else
|
||||
*expires = 0;
|
||||
|
||||
orig_codeset = i18n_switchto_utf8 ();
|
||||
|
||||
rc = asprintf (&name,
|
||||
_("Please enter the passphrase to unlock the"
|
||||
" secret key for:\n"
|
||||
" secret key for the X.509 certificate:\n"
|
||||
"\"%s\"\n"
|
||||
"S/N %s, ID 0x%08lX, created %s" ),
|
||||
"S/N %s, ID 0x%08lX,\n"
|
||||
"created %s, expires %s.\n" ),
|
||||
subject? subject:"?",
|
||||
sn? sn: "?",
|
||||
gpgsm_get_short_fingerprint (cert),
|
||||
created);
|
||||
created, expires);
|
||||
|
||||
i18n_switchback (orig_codeset);
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ print_time (gnupg_isotime_t t, estream_t fp)
|
|||
|
||||
|
||||
/* Return an allocated string with the email address extracted from a
|
||||
DN */
|
||||
DN. Note hat we use this code also in ../kbx/keybox-blob.c. */
|
||||
static char *
|
||||
email_kludge (const char *name)
|
||||
{
|
||||
|
@ -311,7 +311,7 @@ email_kludge (const char *name)
|
|||
|
||||
/* This looks pretty much like an email address in the subject's DN
|
||||
we use this to add an additional user ID entry. This way,
|
||||
openSSL generated keys get a nicer and usable listing */
|
||||
OpenSSL generated keys get a nicer and usable listing. */
|
||||
for (n=0, p=name; hexdigitp (p) && hexdigitp (p+1); p +=2, n++)
|
||||
;
|
||||
if (!n)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue