Prototype fix for IPsec authentication related functions
Some of IPsec authentication related functions should have 'const' for its 2nd argument, but not now. But if someone try to use them, and passed const data for those functions, then much bogus compile warnings will be generated. So those funcs prototype should be modified. Requested by: archie Approved by: jkh
This commit is contained in:
parent
1aa540eb03
commit
f7d7fca7fd
@ -220,7 +220,7 @@ sha1_pad(ctxt)
|
||||
void
|
||||
sha1_loop(ctxt, input0, len)
|
||||
struct sha1_ctxt *ctxt;
|
||||
caddr_t input0;
|
||||
const caddr_t input0;
|
||||
size_t len;
|
||||
{
|
||||
u_int8_t *input;
|
||||
|
@ -56,7 +56,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 *, caddr_t, size_t));
|
||||
extern void sha1_loop __P((struct sha1_ctxt *, const caddr_t, size_t));
|
||||
extern void sha1_result __P((struct sha1_ctxt *, caddr_t));
|
||||
|
||||
/* compatibilty with other SHA1 source codes */
|
||||
|
@ -66,7 +66,8 @@ struct ah_algorithm {
|
||||
int keymin; /* in bits */
|
||||
int keymax; /* in bits */
|
||||
void (*init) __P((struct ah_algorithm_state *, struct secasvar *));
|
||||
void (*update) __P((struct ah_algorithm_state *, caddr_t, size_t));
|
||||
void (*update) __P((struct ah_algorithm_state *, const caddr_t,
|
||||
size_t));
|
||||
void (*result) __P((struct ah_algorithm_state *, caddr_t));
|
||||
};
|
||||
|
||||
|
@ -95,30 +95,31 @@ static int ah_sumsiz_zero __P((struct secasvar *));
|
||||
static int ah_none_mature __P((struct secasvar *));
|
||||
static void ah_none_init __P((struct ah_algorithm_state *,
|
||||
struct secasvar *));
|
||||
static void ah_none_loop __P((struct ah_algorithm_state *, caddr_t, size_t));
|
||||
static void ah_none_loop __P((struct ah_algorithm_state *, const caddr_t,
|
||||
size_t));
|
||||
static void ah_none_result __P((struct ah_algorithm_state *, caddr_t));
|
||||
static int ah_keyed_md5_mature __P((struct secasvar *));
|
||||
static void ah_keyed_md5_init __P((struct ah_algorithm_state *,
|
||||
struct secasvar *));
|
||||
static void ah_keyed_md5_loop __P((struct ah_algorithm_state *, caddr_t,
|
||||
static void ah_keyed_md5_loop __P((struct ah_algorithm_state *, const caddr_t,
|
||||
size_t));
|
||||
static void ah_keyed_md5_result __P((struct ah_algorithm_state *, caddr_t));
|
||||
static int ah_keyed_sha1_mature __P((struct secasvar *));
|
||||
static void ah_keyed_sha1_init __P((struct ah_algorithm_state *,
|
||||
struct secasvar *));
|
||||
static void ah_keyed_sha1_loop __P((struct ah_algorithm_state *, caddr_t,
|
||||
static void ah_keyed_sha1_loop __P((struct ah_algorithm_state *, const caddr_t,
|
||||
size_t));
|
||||
static void ah_keyed_sha1_result __P((struct ah_algorithm_state *, caddr_t));
|
||||
static int ah_hmac_md5_mature __P((struct secasvar *));
|
||||
static void ah_hmac_md5_init __P((struct ah_algorithm_state *,
|
||||
struct secasvar *));
|
||||
static void ah_hmac_md5_loop __P((struct ah_algorithm_state *, caddr_t,
|
||||
static void ah_hmac_md5_loop __P((struct ah_algorithm_state *, const caddr_t,
|
||||
size_t));
|
||||
static void ah_hmac_md5_result __P((struct ah_algorithm_state *, caddr_t));
|
||||
static int ah_hmac_sha1_mature __P((struct secasvar *));
|
||||
static void ah_hmac_sha1_init __P((struct ah_algorithm_state *,
|
||||
struct secasvar *));
|
||||
static void ah_hmac_sha1_loop __P((struct ah_algorithm_state *, caddr_t,
|
||||
static void ah_hmac_sha1_loop __P((struct ah_algorithm_state *, const caddr_t,
|
||||
size_t));
|
||||
static void ah_hmac_sha1_result __P((struct ah_algorithm_state *, caddr_t));
|
||||
|
||||
@ -181,7 +182,7 @@ ah_none_init(state, sav)
|
||||
static void
|
||||
ah_none_loop(state, addr, len)
|
||||
struct ah_algorithm_state *state;
|
||||
caddr_t addr;
|
||||
const caddr_t addr;
|
||||
size_t len;
|
||||
{
|
||||
}
|
||||
@ -261,7 +262,7 @@ ah_keyed_md5_init(state, sav)
|
||||
static void
|
||||
ah_keyed_md5_loop(state, addr, len)
|
||||
struct ah_algorithm_state *state;
|
||||
caddr_t addr;
|
||||
const caddr_t addr;
|
||||
size_t len;
|
||||
{
|
||||
if (!state)
|
||||
@ -373,7 +374,7 @@ ah_keyed_sha1_init(state, sav)
|
||||
static void
|
||||
ah_keyed_sha1_loop(state, addr, len)
|
||||
struct ah_algorithm_state *state;
|
||||
caddr_t addr;
|
||||
const caddr_t addr;
|
||||
size_t len;
|
||||
{
|
||||
SHA1_CTX *ctxt;
|
||||
@ -482,7 +483,7 @@ ah_hmac_md5_init(state, sav)
|
||||
static void
|
||||
ah_hmac_md5_loop(state, addr, len)
|
||||
struct ah_algorithm_state *state;
|
||||
caddr_t addr;
|
||||
const caddr_t addr;
|
||||
size_t len;
|
||||
{
|
||||
MD5_CTX *ctxt;
|
||||
@ -598,7 +599,7 @@ ah_hmac_sha1_init(state, sav)
|
||||
static void
|
||||
ah_hmac_sha1_loop(state, addr, len)
|
||||
struct ah_algorithm_state *state;
|
||||
caddr_t addr;
|
||||
const caddr_t addr;
|
||||
size_t len;
|
||||
{
|
||||
SHA1_CTX *ctxt;
|
||||
|
Loading…
x
Reference in New Issue
Block a user