diff options
author | shin <shin@FreeBSD.org> | 2000-02-10 19:35:53 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-02-10 19:35:53 +0000 |
commit | 0539d56f5e4dcf77c207320d6ee06b0ca8408698 (patch) | |
tree | 54f53c8461a01eee87bd67d67b98637a5a655d79 /sys/netinet6 | |
parent | a0c9aca93ba39577e7f36147df6ca979625e77b1 (diff) | |
download | FreeBSD-src-0539d56f5e4dcf77c207320d6ee06b0ca8408698.zip FreeBSD-src-0539d56f5e4dcf77c207320d6ee06b0ca8408698.tar.gz |
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
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/ah.h | 3 | ||||
-rw-r--r-- | sys/netinet6/ah_core.c | 21 |
2 files changed, 13 insertions, 11 deletions
diff --git a/sys/netinet6/ah.h b/sys/netinet6/ah.h index 06137dd..1b7e602 100644 --- a/sys/netinet6/ah.h +++ b/sys/netinet6/ah.h @@ -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)); }; diff --git a/sys/netinet6/ah_core.c b/sys/netinet6/ah_core.c index e30bf2a..7a5416a 100644 --- a/sys/netinet6/ah_core.c +++ b/sys/netinet6/ah_core.c @@ -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; |