aboutsummaryrefslogtreecommitdiffstats
path: root/cipher
diff options
context:
space:
mode:
Diffstat (limited to 'cipher')
-rw-r--r--cipher/ChangeLog8
-rw-r--r--cipher/md.c5
-rw-r--r--cipher/random.c4
3 files changed, 14 insertions, 3 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index a0700c27e..dd20e1e2d 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -1,3 +1,11 @@
+2001-08-24 Werner Koch <[email protected]>
+
+ * md.c (md_write): Made buf arg const.
+
+2001-08-22 Werner Koch <[email protected]>
+
+ * random.c (fast_random_poll): Don't use gethrtime if it is broken.
+
2001-08-20 Werner Koch <[email protected]>
Applied patches from Stefan Bellon <[email protected]> to support
diff --git a/cipher/md.c b/cipher/md.c
index 6d84772d2..8d20a9804 100644
--- a/cipher/md.c
+++ b/cipher/md.c
@@ -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;
}
diff --git a/cipher/random.c b/cipher/random.c
index 76db0d017..cdbd0b700 100644
--- a/cipher/random.c
+++ b/cipher/random.c
@@ -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 );
}