diff options
-rw-r--r-- | sbin/iked/ca.c | 4 | ||||
-rw-r--r-- | sbin/iked/chap_ms.c | 8 | ||||
-rw-r--r-- | sbin/iked/eap.c | 11 | ||||
-rw-r--r-- | sbin/iked/ikev2.c | 5 | ||||
-rw-r--r-- | sbin/iked/parse.y | 14 | ||||
-rw-r--r-- | sbin/iked/pfkey.c | 4 | ||||
-rw-r--r-- | sbin/iked/timer.c | 4 | ||||
-rw-r--r-- | sbin/iked/util.c | 4 | ||||
-rw-r--r-- | usr.sbin/ikectl/ikeca.c | 16 | ||||
-rw-r--r-- | usr.sbin/ikectl/ikectl.c | 5 | ||||
-rw-r--r-- | usr.sbin/ikectl/parser.c | 14 | ||||
-rw-r--r-- | usr.sbin/ikectl/parser.h | 4 |
12 files changed, 48 insertions, 45 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 diff --git a/usr.sbin/ikectl/ikeca.c b/usr.sbin/ikectl/ikeca.c index 9f95b892aaa..60bdbd28374 100644 --- a/usr.sbin/ikectl/ikeca.c +++ b/usr.sbin/ikectl/ikeca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikeca.c,v 1.19 2010/10/08 16:15:22 reyk Exp $ */ +/* $OpenBSD: ikeca.c,v 1.20 2011/05/27 12:01:02 reyk Exp $ */ /* $vantronix: ikeca.c,v 1.13 2010/06/03 15:52:52 reyk Exp $ */ /* @@ -204,8 +204,8 @@ ca_sign(struct ca *ca, char *keyname, int type, char *envargs) " -passin file:%s", name, envargs, PATH_OPENSSL, ca->sslpath, keyname, ca->sslpath, ca->sslpath, ca->extcnf, ca->sslpath, keyname, ca->passfile); - } else - err(1, "unknown host type %d", type); + } else + err(1, "unknown host type %d", type); system(cmd); @@ -233,7 +233,7 @@ ca_certificate(struct ca *ca, char *keyname, int type, int action) ca_key_create(ca, keyname); ca_request(ca, keyname); ca_sign(ca, keyname, type, envargs); - + return (0); } @@ -373,7 +373,7 @@ ca_install(struct ca *ca, char *dir) char src[PATH_MAX]; char dst[PATH_MAX]; char *p = NULL; - + snprintf(src, sizeof(src), "%s/ca.crt", ca->sslpath); if (stat(src, &st) == -1) { printf("CA '%s' does not exist\n", ca->caname); @@ -572,9 +572,9 @@ ca_export(struct ca *ca, char *keyname, char *myname, char *password) snprintf(cmd, sizeof(cmd), "env EXPASS=%s %s pkcs12 -export" " -name %s -CAfile %s/ca.crt -inkey %s/private/%s.key" " -in %s/%s.crt -out %s/private/%s.pfx -passout env:EXPASS" - " -passin file:%s", pass, PATH_OPENSSL, keyname, ca->sslpath, - ca->sslpath, keyname, ca->sslpath, keyname, ca->sslpath, - oname, ca->passfile); + " -passin file:%s", pass, PATH_OPENSSL, keyname, + ca->sslpath, ca->sslpath, keyname, ca->sslpath, keyname, + ca->sslpath, oname, ca->passfile); system(cmd); } diff --git a/usr.sbin/ikectl/ikectl.c b/usr.sbin/ikectl/ikectl.c index 64bdbd5d6b2..cc4dca67ea7 100644 --- a/usr.sbin/ikectl/ikectl.c +++ b/usr.sbin/ikectl/ikectl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikectl.c,v 1.11 2010/10/08 11:41:56 jsg Exp $ */ +/* $OpenBSD: ikectl.c,v 1.12 2011/05/27 12:01:02 reyk Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net> @@ -72,7 +72,8 @@ usage(void) { extern char *__progname; - fprintf(stderr, "usage: %s [-q] [-s socket] command [arg ...]\n", __progname); + fprintf(stderr, "usage: %s [-q] [-s socket] command [arg ...]\n", + __progname); exit(1); } diff --git a/usr.sbin/ikectl/parser.c b/usr.sbin/ikectl/parser.c index 19e721dec99..ed240dd3e54 100644 --- a/usr.sbin/ikectl/parser.c +++ b/usr.sbin/ikectl/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.9 2010/10/08 10:13:47 jsg Exp $ */ +/* $OpenBSD: parser.c,v 1.10 2011/05/27 12:01:02 reyk Exp $ */ /* * Copyright (c) 2010 Reyk Floeter <reyk@vantronix.net> @@ -95,9 +95,9 @@ static const struct token t_main[] = { }; static const struct token t_log[] = { - { KEYWORD, "verbose", LOG_VERBOSE, NULL }, - { KEYWORD, "brief", LOG_BRIEF, NULL }, - { ENDTOKEN, "", NONE, NULL } + { KEYWORD, "verbose", LOG_VERBOSE, NULL }, + { KEYWORD, "brief", LOG_BRIEF, NULL }, + { ENDTOKEN, "", NONE, NULL } }; static const struct token t_reset[] = { @@ -111,7 +111,7 @@ static const struct token t_reset[] = { static const struct token t_load[] = { { PATH, "", NONE, NULL }, - { ENDTOKEN, "", NONE, NULL } + { ENDTOKEN, "", NONE, NULL } }; static const struct token t_ca[] = { @@ -126,7 +126,7 @@ static const struct token t_ca_modifiers[] = { { KEYWORD, "certificate", CA_CERTIFICATE, t_ca_cert }, { KEYWORD, "key", NONE, t_ca_key }, { KEYWORD, "export", CA_EXPORT, t_ca_export }, - { ENDTOKEN, "", NONE, NULL } + { ENDTOKEN, "", NONE, NULL } }; static const struct token t_ca_pass_val[] = { @@ -201,7 +201,7 @@ static const struct token t_ca_key_modifiers[] = { static const struct token t_ca_key_path[] = { { PATH, "", NONE, NULL }, - { PATH, "", NONE, NULL } + { PATH, "", NONE, NULL } }; static const struct token t_show[] = { diff --git a/usr.sbin/ikectl/parser.h b/usr.sbin/ikectl/parser.h index 1c40381a2b3..afa70507eaf 100644 --- a/usr.sbin/ikectl/parser.h +++ b/usr.sbin/ikectl/parser.h @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.h,v 1.9 2010/10/08 10:13:47 jsg Exp $ */ +/* $OpenBSD: parser.h,v 1.10 2011/05/27 12:01:02 reyk Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net> @@ -60,7 +60,7 @@ struct parse_result { enum actions action; struct imsgbuf *ibuf; char *path; - char *caname; + char *caname; char *pass; char *host; char *peer; |