summaryrefslogtreecommitdiff
path: root/sbin/photurisd/photuris_identity_request.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/photurisd/photuris_identity_request.c')
-rw-r--r--sbin/photurisd/photuris_identity_request.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/sbin/photurisd/photuris_identity_request.c b/sbin/photurisd/photuris_identity_request.c
index 17b8cb67996..ee3a7d971a4 100644
--- a/sbin/photurisd/photuris_identity_request.c
+++ b/sbin/photurisd/photuris_identity_request.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: photuris_identity_request.c,v 1.3 2001/01/28 22:45:14 niklas Exp $ */
+/* $OpenBSD: photuris_identity_request.c,v 1.4 2002/06/09 08:13:08 todd Exp $ */
/*
* Copyright 1997-2000 Niels Provos <provos@citi.umich.edu>
@@ -36,7 +36,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: photuris_identity_request.c,v 1.3 2001/01/28 22:45:14 niklas Exp $";
+static char rcsid[] = "$OpenBSD: photuris_identity_request.c,v 1.4 2002/06/09 08:13:08 todd Exp $";
#endif
#include <stdio.h>
@@ -82,19 +82,19 @@ photuris_identity_request(struct stateob *st, u_char *buffer, int *size)
tmp = rsize; /* Remaining size */
/* Choose and Copy choice */
- if (choose_identity(st, p, &tmp, st->uSPIoattrib,
- st->uSPIoattribsize) == -1 )
+ if (choose_identity(st, p, &tmp, st->uSPIoattrib,
+ st->uSPIoattribsize) == -1 )
return -1;
p += tmp; asize += tmp; rsize -= tmp;
verifyp = p;
- /* Leave space for verification data */
- tmp = get_identity_verification_size(st, IDENTITY_MESSAGE_CHOICE(header));
-
- if (rsize < tmp)
- return -1; /* buffer not large enough */
+ /* Leave space for verification data */
+ tmp = get_identity_verification_size(st, IDENTITY_MESSAGE_CHOICE(header));
+
+ if (rsize < tmp)
+ return -1; /* buffer not large enough */
/* Zero the buffer, so we can hash over it */
bzero(verifyp, tmp);
@@ -111,14 +111,14 @@ photuris_identity_request(struct stateob *st, u_char *buffer, int *size)
p += st->oSPIattribsize;
tmp = rsize;
- if(packet_create_padding(st, asize - IDENTITY_MESSAGE_MIN,
- p, &tmp) == -1)
- return -1;
-
- p += tmp; asize += tmp; rsize -= tmp;
-
- /* Create verification data */
- create_identity_verification(st, verifyp, (u_int8_t *)header, asize);
+ if(packet_create_padding(st, asize - IDENTITY_MESSAGE_MIN,
+ p, &tmp) == -1)
+ return -1;
+
+ p += tmp; asize += tmp; rsize -= tmp;
+
+ /* Create verification data */
+ create_identity_verification(st, verifyp, (u_int8_t *)header, asize);
#ifdef DEBUG2
printf("Identity-Request (before encryption):\n");