mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Various smaller changes
This commit is contained in:
parent
f081ad529d
commit
98c6970ad1
11 changed files with 71 additions and 15 deletions
|
@ -1,3 +1,14 @@
|
|||
2006-06-26 Werner Koch <wk@g10code.com>
|
||||
|
||||
* gpg-agent.c (handle_signal): Print infor for SIGUSR2 only in
|
||||
verbose mode.
|
||||
|
||||
2006-06-22 Werner Koch <wk@g10code.com>
|
||||
|
||||
* command-ssh.c (make_cstring): Use memcpy instead of strncpy.
|
||||
(ssh_receive_mpint_list, sexp_key_extract, data_sign): Use
|
||||
xtrycalloc instead of xtrymalloc followed by memset.
|
||||
|
||||
2006-06-20 Werner Koch <wk@g10code.com>
|
||||
|
||||
* minip12.c (create_final): New arg PW. Add code to calculate the
|
||||
|
|
|
@ -268,7 +268,7 @@ make_cstring (const char *data, size_t data_n)
|
|||
s = xtrymalloc (data_n + 1);
|
||||
if (s)
|
||||
{
|
||||
strncpy (s, data, data_n);
|
||||
memcpy (s, data, data_n);
|
||||
s[data_n] = 0;
|
||||
}
|
||||
|
||||
|
@ -853,14 +853,12 @@ ssh_receive_mpint_list (estream_t stream, int secret,
|
|||
elems_public = key_spec.elems_key_public;
|
||||
elems_public_n = strlen (elems_public);
|
||||
|
||||
mpis = xtrymalloc (sizeof (*mpis) * (elems_n + 1));
|
||||
if (! mpis)
|
||||
mpis = xtrycalloc (elems_n + 1, sizeof *mpis );
|
||||
if (!mpis)
|
||||
{
|
||||
err = gpg_error_from_errno (errno);
|
||||
goto out;
|
||||
}
|
||||
|
||||
memset (mpis, 0, sizeof (*mpis) * (elems_n + 1));
|
||||
|
||||
elem_is_secret = 0;
|
||||
for (i = 0; i < elems_n; i++)
|
||||
|
@ -1143,13 +1141,12 @@ sexp_key_extract (gcry_sexp_t sexp,
|
|||
}
|
||||
|
||||
elems_n = strlen (elems);
|
||||
mpis_new = xtrymalloc (sizeof (*mpis_new) * (elems_n + 1));
|
||||
if (! mpis_new)
|
||||
mpis_new = xtrycalloc (elems_n + 1, sizeof *mpis_new );
|
||||
if (!mpis_new)
|
||||
{
|
||||
err = gpg_error_from_errno (errno);
|
||||
goto out;
|
||||
}
|
||||
memset (mpis_new, 0, sizeof (*mpis_new) * (elems_n + 1));
|
||||
|
||||
value_list = gcry_sexp_find_token (sexp, key_spec.identifier, 0);
|
||||
if (! value_list)
|
||||
|
@ -2055,13 +2052,12 @@ data_sign (ctrl_t ctrl, ssh_signature_encoder_t sig_encoder,
|
|||
elems = spec.elems_signature;
|
||||
elems_n = strlen (elems);
|
||||
|
||||
mpis = xtrymalloc (sizeof (*mpis) * (elems_n + 1));
|
||||
if (! mpis)
|
||||
mpis = xtrycalloc (elems_n + 1, sizeof *mpis);
|
||||
if (!mpis)
|
||||
{
|
||||
err = gpg_error_from_errno (errno);
|
||||
goto out;
|
||||
}
|
||||
memset (mpis, 0, sizeof (*mpis) * (elems_n + 1));
|
||||
|
||||
for (i = 0; i < elems_n; i++)
|
||||
{
|
||||
|
|
|
@ -1360,7 +1360,8 @@ handle_signal (int signo)
|
|||
break;
|
||||
|
||||
case SIGUSR2:
|
||||
log_info ("SIGUSR2 received - checking smartcard status\n");
|
||||
if (opt.verbose)
|
||||
log_info ("SIGUSR2 received - checking smartcard status\n");
|
||||
break;
|
||||
|
||||
case SIGTERM:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue