hipl-core team mailing list archive
-
hipl-core team
-
Mailing list archive
-
Message #00025
[Branch ~hipl-core/hipl/trunk] Rev 4900: Fixed compilation with --enable-midauth
------------------------------------------------------------
revno: 4900
committer: Artturi Karila <artturi.karila@xxxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-08-19 13:43:06 +0300
message:
Fixed compilation with --enable-midauth
This was broken in r4898.
modified:
firewall/midauth.c
firewall/pisa.c
lib/core/builder.c
lib/core/builder.h
lib/core/solve.c
--
lp:hipl
https://code.launchpad.net/~hipl-core/hipl/trunk
Your team HIPL core team is subscribed to branch lp:hipl.
To unsubscribe from this branch go to https://code.launchpad.net/~hipl-core/hipl/trunk/+edit-subscription
=== modified file 'firewall/midauth.c'
--- firewall/midauth.c 2010-08-18 17:57:40 +0000
+++ firewall/midauth.c 2010-08-19 10:43:06 +0000
@@ -286,7 +286,7 @@
struct hip_tlv_common *i = NULL, *last = NULL;
hip_tlv_type_t type;
- while ((i = hip_get_next_param(hip, i))) {
+ while ((i = hip_get_next_param_readwrite(hip, i))) {
last = i;
}
@@ -304,7 +304,7 @@
memcpy(buffer, last, len);
i = NULL;
- while ((i = hip_get_next_param(hip, i))) {
+ while ((i = hip_get_next_param_readwrite(hip, i))) {
if (hip_get_param_type(i) > type) {
offset = (char *) i - (char *) hip;
=== modified file 'firewall/pisa.c'
--- firewall/pisa.c 2010-07-04 17:54:18 +0000
+++ firewall/pisa.c 2010-08-19 10:43:06 +0000
@@ -221,7 +221,7 @@
pisa_append_hmac(&hip->hits, &hip->hitr, 0, &hash[0], 4);
pisa_append_hmac(&hip->hits, &hip->hitr, 1, &hash[1], 4);
- response = hip_get_param(hip, HIP_PARAM_CHALLENGE_RESPONSE);
+ response = hip_get_param_readwrite(hip, HIP_PARAM_CHALLENGE_RESPONSE);
while (response) {
/* loop over all HIP_PARAM_CHALLENGE_RESPONSE */
@@ -236,7 +236,8 @@
}
response = (struct hip_challenge_response *)
- hip_get_next_param(hip, (struct hip_tlv_common *) response);
+ hip_get_next_param_readwrite(hip,
+ (struct hip_tlv_common *) response);
}
return NULL;
@@ -251,7 +252,7 @@
static int pisa_check_certificate(hip_fw_context_t *ctx)
{
struct hip_common *hip = ctx->transport_hdr.hip;
- struct hip_cert *cert;
+ const struct hip_cert *cert;
struct hip_cert_spki_info ci;
struct pisa_cert pc;
char *buf = NULL;
=== modified file 'lib/core/builder.c'
--- lib/core/builder.c 2010-08-19 09:32:20 +0000
+++ lib/core/builder.c 2010-08-19 10:43:06 +0000
@@ -2510,7 +2510,8 @@
*
* @return zero for success, or non-zero on error
*/
-int hip_build_param_challenge_response(struct hip_common *msg, struct hip_challenge_request *pz,
+int hip_build_param_challenge_response(struct hip_common *msg,
+ const struct hip_challenge_request *pz,
uint64_t val_J)
{
struct hip_challenge_response cookie;
=== modified file 'lib/core/builder.h'
--- lib/core/builder.h 2010-08-19 09:32:20 +0000
+++ lib/core/builder.h 2010-08-19 10:43:06 +0000
@@ -151,7 +151,7 @@
uint64_t);
int hip_build_param_challenge_response(struct hip_common *,
- struct hip_challenge_request *,
+ const struct hip_challenge_request *,
uint64_t);
int hip_build_param(struct hip_common *, const void *);
=== modified file 'lib/core/solve.c'
--- lib/core/solve.c 2010-08-19 09:32:20 +0000
+++ lib/core/solve.c 2010-08-19 10:43:06 +0000
@@ -159,13 +159,12 @@
*/
int hip_solve_puzzle_m(struct hip_common *out, struct hip_common *in)
{
- struct hip_challenge_request *pz;
+ const struct hip_challenge_request *pz;
struct hip_puzzle tmp;
uint64_t solution;
int err = 0;
uint8_t digist[HIP_AH_SHA_LEN];
-
pz = hip_get_param(in, HIP_PARAM_CHALLENGE_REQUEST);
while (pz) {
if (hip_get_param_type(pz) != HIP_PARAM_CHALLENGE_REQUEST) {
@@ -188,8 +187,8 @@
HIP_IFEL(hip_build_param_challenge_response(out, pz, ntoh64(solution)) < 0,
-1,
"Error while creating solution_m reply parameter\n");
- pz = (struct hip_challenge_request *) hip_get_next_param(in,
- (struct hip_tlv_common *) pz);
+ pz = (const struct hip_challenge_request *)
+ hip_get_next_param(in, (const struct hip_tlv_common *) pz);
}
out_err: