mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Random changes
This commit is contained in:
parent
93654f5289
commit
64d586ef17
10 changed files with 76 additions and 21 deletions
|
@ -1,3 +1,11 @@
|
|||
2001-08-24 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* md.c (md_write): Made buf arg const.
|
||||
|
||||
2001-08-22 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* random.c (fast_random_poll): Don't use gethrtime if it is broken.
|
||||
|
||||
2001-08-20 Werner Koch <wk@gnupg.org>
|
||||
|
||||
Applied patches from Stefan Bellon <sbellon@sbellon.de> to support
|
||||
|
|
|
@ -317,7 +317,7 @@ md_close(MD_HANDLE a)
|
|||
|
||||
|
||||
void
|
||||
md_write( MD_HANDLE a, byte *inbuf, size_t inlen)
|
||||
md_write( MD_HANDLE a, const byte *inbuf, size_t inlen)
|
||||
{
|
||||
struct md_digest_list_s *r;
|
||||
|
||||
|
@ -329,7 +329,8 @@ md_write( MD_HANDLE a, byte *inbuf, size_t inlen)
|
|||
}
|
||||
for(r=a->list; r; r = r->next ) {
|
||||
(*r->write)( &r->context.c, a->buffer, a->bufcount );
|
||||
(*r->write)( &r->context.c, inbuf, inlen );
|
||||
/* Fixme: all ->write fnc should take a const byte* */
|
||||
(*r->write)( &r->context.c, (byte*)inbuf, inlen );
|
||||
}
|
||||
a->bufcount = 0;
|
||||
}
|
||||
|
|
|
@ -568,8 +568,10 @@ fast_random_poll()
|
|||
}
|
||||
|
||||
/* fall back to the generic function */
|
||||
#ifdef HAVE_GETHRTIME
|
||||
#if defined(HAVE_GETHRTIME) && !defined(HAVE_BROKEN_GETHRTIME)
|
||||
{ hrtime_t tv;
|
||||
/* On some Solaris and HPUX system gethrtime raises an SIGILL, but we
|
||||
* checked this with configure */
|
||||
tv = gethrtime();
|
||||
add_randomness( &tv, sizeof(tv), 1 );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue