Fix broken const'ness in declaration of sha1_loop().
This commit is contained in:
parent
acadb17f53
commit
8576ccb74b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=66890
@ -219,18 +219,16 @@ sha1_pad(ctxt)
|
||||
}
|
||||
|
||||
void
|
||||
sha1_loop(ctxt, input0, len)
|
||||
sha1_loop(ctxt, input, len)
|
||||
struct sha1_ctxt *ctxt;
|
||||
const caddr_t input0;
|
||||
const u_int8_t *input;
|
||||
size_t len;
|
||||
{
|
||||
const u_int8_t *input;
|
||||
size_t gaplen;
|
||||
size_t gapstart;
|
||||
size_t off;
|
||||
size_t copysiz;
|
||||
|
||||
input = (const u_int8_t *)input0;
|
||||
off = 0;
|
||||
|
||||
while (off < len) {
|
||||
|
@ -57,7 +57,7 @@ struct sha1_ctxt {
|
||||
#ifdef _KERNEL
|
||||
extern void sha1_init __P((struct sha1_ctxt *));
|
||||
extern void sha1_pad __P((struct sha1_ctxt *));
|
||||
extern void sha1_loop __P((struct sha1_ctxt *, const caddr_t, size_t));
|
||||
extern void sha1_loop __P((struct sha1_ctxt *, const u_int8_t *, size_t));
|
||||
extern void sha1_result __P((struct sha1_ctxt *, caddr_t));
|
||||
|
||||
/* compatibilty with other SHA1 source codes */
|
||||
@ -65,7 +65,7 @@ typedef struct sha1_ctxt SHA1_CTX;
|
||||
#define SHA1Init(x) sha1_init((x))
|
||||
#define SHA1Update(x, y, z) sha1_loop((x), (y), (z))
|
||||
#define SHA1Final(x, y) sha1_result((y), (x))
|
||||
#endif
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#define SHA1_RESULTLEN (160/8)
|
||||
|
||||
|
@ -385,7 +385,7 @@ ah_keyed_sha1_loop(state, addr, len)
|
||||
panic("ah_keyed_sha1_loop: what?");
|
||||
ctxt = (SHA1_CTX *)state->foo;
|
||||
|
||||
SHA1Update(ctxt, (caddr_t)addr, (size_t)len);
|
||||
SHA1Update(ctxt, (u_int8_t *)addr, (size_t)len);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -579,7 +579,7 @@ ah_hmac_sha1_init(state, sav)
|
||||
/* compress the key if necessery */
|
||||
if (64 < _KEYLEN(state->sav->key_auth)) {
|
||||
SHA1Init(ctxt);
|
||||
SHA1Update(ctxt, _KEYBUF(state->sav->key_auth),
|
||||
SHA1Update(ctxt, (u_int8_t *)_KEYBUF(state->sav->key_auth),
|
||||
_KEYLEN(state->sav->key_auth));
|
||||
SHA1Final(&tk[0], ctxt);
|
||||
key = &tk[0];
|
||||
@ -616,7 +616,7 @@ ah_hmac_sha1_loop(state, addr, len)
|
||||
panic("ah_hmac_sha1_loop: what?");
|
||||
|
||||
ctxt = (SHA1_CTX *)(((u_char *)state->foo) + 128);
|
||||
SHA1Update(ctxt, (caddr_t)addr, (size_t)len);
|
||||
SHA1Update(ctxt, (u_int8_t *)addr, (size_t)len);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -640,7 +640,7 @@ ah_hmac_sha1_result(state, addr)
|
||||
|
||||
SHA1Init(ctxt);
|
||||
SHA1Update(ctxt, opad, 64);
|
||||
SHA1Update(ctxt, (caddr_t)&digest[0], sizeof(digest));
|
||||
SHA1Update(ctxt, (u_int8_t *)&digest[0], sizeof(digest));
|
||||
SHA1Final((caddr_t)&digest[0], ctxt);
|
||||
|
||||
bcopy(&digest[0], (void *)addr, HMACSIZE);
|
||||
|
Loading…
Reference in New Issue
Block a user