summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/iked/ca.c4
-rw-r--r--sbin/iked/chap_ms.c8
-rw-r--r--sbin/iked/eap.c11
-rw-r--r--sbin/iked/ikev2.c5
-rw-r--r--sbin/iked/parse.y14
-rw-r--r--sbin/iked/pfkey.c4
-rw-r--r--sbin/iked/timer.c4
-rw-r--r--sbin/iked/util.c4
8 files changed, 28 insertions, 26 deletions
diff --git a/sbin/iked/ca.c b/sbin/iked/ca.c
index 5cebe3b377d..f533653d98d 100644
--- a/sbin/iked/ca.c
+++ b/sbin/iked/ca.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ca.c,v 1.16 2011/05/09 11:15:18 reyk Exp $ */
+/* $OpenBSD: ca.c,v 1.17 2011/05/27 12:01:02 reyk Exp $ */
/* $vantronix: ca.c,v 1.29 2010/06/02 12:22:58 reyk Exp $ */
/*
@@ -978,7 +978,7 @@ ca_validate_cert(struct iked *env, struct iked_static_id *id,
goto done;
}
- if (!result) {
+ if (!result) {
/* XXX should we accept self-signed certificates? */
errstr = "rejecting self-signed certificate";
goto done;
diff --git a/sbin/iked/chap_ms.c b/sbin/iked/chap_ms.c
index 50975c62864..2a5e5fb7f09 100644
--- a/sbin/iked/chap_ms.c
+++ b/sbin/iked/chap_ms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: chap_ms.c,v 1.1 2010/06/03 16:41:12 reyk Exp $ */
+/* $OpenBSD: chap_ms.c,v 1.2 2011/05/27 12:01:02 reyk Exp $ */
/* $vantronix: chap_ms.c,v 1.7 2010/06/02 12:22:58 reyk Exp $ */
/*
@@ -159,7 +159,7 @@ mschap_challenge_hash(u_int8_t *peer_challenge, u_int8_t *auth_challenge,
name++;
EVP_DigestInit(&ctx, EVP_sha1());
- EVP_DigestUpdate(&ctx, peer_challenge, MSCHAPV2_CHALLENGE_SZ);
+ EVP_DigestUpdate(&ctx, peer_challenge, MSCHAPV2_CHALLENGE_SZ);
EVP_DigestUpdate(&ctx, auth_challenge, MSCHAPV2_CHALLENGE_SZ);
EVP_DigestUpdate(&ctx, name, strlen(name));
EVP_DigestFinal(&ctx, md, &mdlen);
@@ -395,7 +395,7 @@ mschap_radiuskey(u_int8_t *plain, const u_int8_t *crypted,
EVP_DigestUpdate(&ctx, crypted, 2);
EVP_DigestFinal(&ctx, b, &mdlen);
- for(i = 0; i < mdlen; i++) {
+ for (i = 0; i < mdlen; i++) {
p[i] = b[i] ^ crypted[i+2];
}
@@ -404,7 +404,7 @@ mschap_radiuskey(u_int8_t *plain, const u_int8_t *crypted,
EVP_DigestUpdate(&ctx, crypted + 2, mdlen);
EVP_DigestFinal(&ctx, b, &mdlen);
- for(i = 0; i < mdlen; i++) {
+ for (i = 0; i < mdlen; i++) {
p[i+16] = b[i] ^ crypted[i+18];
}
diff --git a/sbin/iked/eap.c b/sbin/iked/eap.c
index 144aef8a16c..98b05e06d1d 100644
--- a/sbin/iked/eap.c
+++ b/sbin/iked/eap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eap.c,v 1.4 2010/12/21 13:24:11 mikeb Exp $ */
+/* $OpenBSD: eap.c,v 1.5 2011/05/27 12:01:02 reyk Exp $ */
/* $vantronix: eap.c,v 1.12 2010/05/31 11:30:08 reyk Exp $ */
/*
@@ -73,7 +73,7 @@ eap_identity_response(struct eap_message *eap)
{
size_t len;
char *str;
- u_int8_t *ptr = (u_int8_t *)eap;
+ u_int8_t *ptr = (u_int8_t *)eap;
len = betoh16(eap->eap_length) - sizeof(*eap);
ptr += sizeof(*eap);
@@ -241,7 +241,7 @@ eap_mschap(struct iked *env, struct iked_sa *sa, struct eap_message *eap)
return (-1);
msp = &msr->msr_response.resp_peer;
- mschap_nt_response(ibuf_data(sa->sa_eap.id_buf),
+ mschap_nt_response(ibuf_data(sa->sa_eap.id_buf),
msp->msp_challenge, usr->usr_name, strlen(usr->usr_name),
pass, passlen, ntresponse);
@@ -257,8 +257,9 @@ eap_mschap(struct iked *env, struct iked_sa *sa, struct eap_message *eap)
bzero(&successmsg, sizeof(successmsg));
mschap_auth_response(pass, passlen,
- ntresponse, ibuf_data(sa->sa_eap.id_buf), msp->msp_challenge,
- usr->usr_name, strlen(usr->usr_name), successmsg);
+ ntresponse, ibuf_data(sa->sa_eap.id_buf),
+ msp->msp_challenge, usr->usr_name, strlen(usr->usr_name),
+ successmsg);
if ((sa->sa_eapmsk = ibuf_new(NULL, MSCHAP_MSK_SZ)) == NULL) {
log_debug("%s: failed to get MSK", __func__);
free(pass);
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c
index 00b2f27db06..3ab9684f8bf 100644
--- a/sbin/iked/ikev2.c
+++ b/sbin/iked/ikev2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2.c,v 1.55 2011/05/09 11:15:18 reyk Exp $ */
+/* $OpenBSD: ikev2.c,v 1.56 2011/05/27 12:01:02 reyk Exp $ */
/* $vantronix: ikev2.c,v 1.101 2010/06/03 07:57:33 reyk Exp $ */
/*
@@ -2634,7 +2634,8 @@ ikev2_sa_negotiate(struct iked_sa *sa, struct iked_proposals *local,
continue;
print_debug("%s: xform %d "
- "<-> %d (%d): %s %s (keylength %d <-> %d)", __func__,
+ "<-> %d (%d): %s %s "
+ "(keylength %d <-> %d)", __func__,
ppeer->prop_id, plocal->prop_id,
tlocal->xform_score,
print_map(type,
diff --git a/sbin/iked/parse.y b/sbin/iked/parse.y
index e4fb5353992..deca4b3908f 100644
--- a/sbin/iked/parse.y
+++ b/sbin/iked/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.21 2011/04/18 08:45:43 reyk Exp $ */
+/* $OpenBSD: parse.y,v 1.22 2011/05/27 12:01:02 reyk Exp $ */
/* $vantronix: parse.y,v 1.22 2010/06/03 11:08:34 reyk Exp $ */
/*
@@ -149,9 +149,9 @@ const struct ipsec_xf ipsecencxfs[] = {
{ "3des", IKEV2_XFORMENCR_3DES, 24 },
{ "3des-cbc", IKEV2_XFORMENCR_3DES, 24 },
{ "aes-128", IKEV2_XFORMENCR_AES_CBC, 16, 16 },
- { "aes-192", IKEV2_XFORMENCR_AES_CBC, 24, 24 },
- { "aes-256", IKEV2_XFORMENCR_AES_CBC, 32, 32 },
- { "aes-ctr", IKEV2_XFORMENCR_AES_CTR, 16, 16, 4 },
+ { "aes-192", IKEV2_XFORMENCR_AES_CBC, 24, 24 },
+ { "aes-256", IKEV2_XFORMENCR_AES_CBC, 32, 32 },
+ { "aes-ctr", IKEV2_XFORMENCR_AES_CTR, 16, 16, 4 },
{ "aes-128-gcm", IKEV2_XFORMENCR_AES_GCM_16, 16, 16, 4, 1 },
{ "aes-192-gcm", IKEV2_XFORMENCR_AES_GCM_16, 24, 24, 4, 1 },
{ "aes-256-gcm", IKEV2_XFORMENCR_AES_GCM_16, 32, 32, 4, 1 },
@@ -713,7 +713,7 @@ transform : AUTHXF STRING {
ike_sa : /* empty */ {
$$ = NULL;
}
- | IKESA {
+ | IKESA {
encxfs = ikeencxfs;
} transforms {
if (($$ = calloc(1, sizeof(*$$))) == NULL)
@@ -725,9 +725,9 @@ ike_sa : /* empty */ {
child_sa : /* empty */ {
$$ = NULL;
}
- | CHILDSA {
+ | CHILDSA {
encxfs = ipsecencxfs;
- } transforms {
+ } transforms {
if (($$ = calloc(1, sizeof(*$$))) == NULL)
err(1, "child_sa: calloc");
$$->xfs = $3;
diff --git a/sbin/iked/pfkey.c b/sbin/iked/pfkey.c
index 85a4e3f739c..45a9eba40e4 100644
--- a/sbin/iked/pfkey.c
+++ b/sbin/iked/pfkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkey.c,v 1.15 2011/05/05 12:17:10 reyk Exp $ */
+/* $OpenBSD: pfkey.c,v 1.16 2011/05/27 12:01:02 reyk Exp $ */
/* $vantronix: pfkey.c,v 1.11 2010/06/03 07:57:33 reyk Exp $ */
/*
@@ -1198,7 +1198,7 @@ pfkey_id2ident(struct iked_id *id, u_int exttype)
int
pfkey_socket(void)
{
- int fd;
+ int fd;
if (privsep_process != PROC_PARENT)
fatal("pfkey_socket: called from unprivileged process");
diff --git a/sbin/iked/timer.c b/sbin/iked/timer.c
index 47f16f983b0..244900661be 100644
--- a/sbin/iked/timer.c
+++ b/sbin/iked/timer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: timer.c,v 1.4 2011/01/26 17:07:59 reyk Exp $ */
+/* $OpenBSD: timer.c,v 1.5 2011/05/27 12:01:02 reyk Exp $ */
/*
* Copyright (c) 2010 Reyk Floeter <reyk@vantronix.net>
@@ -34,7 +34,7 @@
struct timer_cbarg {
int tmr_active;
- struct event tmr_ev;
+ struct event tmr_ev;
struct iked *tmr_env;
struct timeval tmr_first;
struct timeval tmr_last;
diff --git a/sbin/iked/util.c b/sbin/iked/util.c
index 49d00cdcf78..a3cda7bff97 100644
--- a/sbin/iked/util.c
+++ b/sbin/iked/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.12 2011/01/21 11:56:00 reyk Exp $ */
+/* $OpenBSD: util.c,v 1.13 2011/05/27 12:01:02 reyk Exp $ */
/* $vantronix: util.c,v 1.39 2010/06/02 12:22:58 reyk Exp $ */
/*
@@ -500,7 +500,7 @@ u_int8_t
mask2prefixlen6(struct sockaddr *sa)
{
struct sockaddr_in6 *sa_in6 = (struct sockaddr_in6 *)sa;
- u_int8_t l = 0, *ap, *ep;
+ u_int8_t l = 0, *ap, *ep;
/*
* sin6_len is the size of the sockaddr so substract the offset of