diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2021-12-01 16:42:14 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2021-12-01 16:42:14 +0000 |
commit | 0cd7981796aec12e08aebbcfa1f9261d02eead4f (patch) | |
tree | b5413c289367d68918e901d4391584aa25cd9697 /sbin/iked | |
parent | 5c5ac9bf6824a286285b5c684059d4c656192580 (diff) |
whitespace cleanup during review read
Diffstat (limited to 'sbin/iked')
-rw-r--r-- | sbin/iked/ca.c | 8 | ||||
-rw-r--r-- | sbin/iked/crypto.c | 8 | ||||
-rw-r--r-- | sbin/iked/iked.c | 4 | ||||
-rw-r--r-- | sbin/iked/iked.h | 6 | ||||
-rw-r--r-- | sbin/iked/ikev2.c | 10 | ||||
-rw-r--r-- | sbin/iked/ikev2_msg.c | 10 | ||||
-rw-r--r-- | sbin/iked/ikev2_pld.c | 12 | ||||
-rw-r--r-- | sbin/iked/parse.y | 6 | ||||
-rw-r--r-- | sbin/iked/policy.c | 4 | ||||
-rw-r--r-- | sbin/iked/vroute.c | 6 |
10 files changed, 37 insertions, 37 deletions
diff --git a/sbin/iked/ca.c b/sbin/iked/ca.c index 4af8a708a09..88bc2ac85c4 100644 --- a/sbin/iked/ca.c +++ b/sbin/iked/ca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ca.c,v 1.80 2021/11/25 18:28:51 tobhe Exp $ */ +/* $OpenBSD: ca.c,v 1.81 2021/12/01 16:42:12 deraadt Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -74,7 +74,7 @@ int ca_x509_subjectaltname_get(X509 *cert, struct iked_id *); int ca_dispatch_parent(int, struct privsep_proc *, struct imsg *); int ca_dispatch_ikev2(int, struct privsep_proc *, struct imsg *); int ca_dispatch_control(int, struct privsep_proc *, struct imsg *); -void ca_store_info(struct iked *, const char *, X509_STORE *); +void ca_store_info(struct iked *, const char *, X509_STORE *); static struct privsep_proc procs[] = { { "parent", PROC_PARENT, ca_dispatch_parent }, @@ -126,7 +126,7 @@ ca_run(struct privsep *ps, struct privsep_proc *p, void *arg) void ca_shutdown(struct privsep_proc *p) { - struct iked *env = p->p_env; + struct iked *env = p->p_env; struct ca_store *store; if (env == NULL) @@ -1765,7 +1765,7 @@ ca_x509_subjectaltname_do(X509 *cert, int mode, const char *logmsg, if ((sanid.id_buf = ibuf_new(data, len)) == NULL) { log_debug("%s: failed to get id buffer", - __func__); + __func__); continue; } ikev2_print_id(&sanid, idstr, sizeof(idstr)); diff --git a/sbin/iked/crypto.c b/sbin/iked/crypto.c index ac0e4967d82..59cac673029 100644 --- a/sbin/iked/crypto.c +++ b/sbin/iked/crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crypto.c,v 1.37 2021/11/29 06:43:42 deraadt Exp $ */ +/* $OpenBSD: crypto.c,v 1.38 2021/12/01 16:42:12 deraadt Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -638,8 +638,8 @@ cipher_final(struct iked_cipher *encr) /* * We always have EVP_CIPH_NO_PADDING set. This means arg - * out is not used and olen should always be 0. - */ + * out is not used and olen should always be 0. + */ if (EVP_CipherFinal_ex(encr->encr_ctx, NULL, &olen) != 1) { ca_sslerror(__func__); return (-1); @@ -926,7 +926,7 @@ _dsa_verify_init(struct iked_dsa *dsa, const uint8_t *sig, size_t len) int dsa_init(struct iked_dsa *dsa, const void *buf, size_t len) { - int ret; + int ret; EVP_PKEY_CTX *pctx = NULL; if (dsa->dsa_hmac) { diff --git a/sbin/iked/iked.c b/sbin/iked/iked.c index 621801cb65d..210dd998378 100644 --- a/sbin/iked/iked.c +++ b/sbin/iked/iked.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iked.c,v 1.61 2021/11/29 13:20:24 jmc Exp $ */ +/* $OpenBSD: iked.c,v 1.62 2021/12/01 16:42:12 deraadt Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -316,7 +316,7 @@ parent_reload(struct iked *env, int reset, const char *filename) config_setcoupled(env, env->sc_decoupled ? 0 : 1); config_setocsp(env); config_setcertpartialchain(env); - /* Must be last */ + /* Must be last */ config_setmode(env, env->sc_passive ? 1 : 0); } else { config_setreset(env, reset, PROC_IKEV2); diff --git a/sbin/iked/iked.h b/sbin/iked/iked.h index 019e8c12b98..b2ad5d85919 100644 --- a/sbin/iked/iked.h +++ b/sbin/iked/iked.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iked.h,v 1.200 2021/11/29 06:43:42 deraadt Exp $ */ +/* $OpenBSD: iked.h,v 1.201 2021/12/01 16:42:12 deraadt Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -497,8 +497,8 @@ struct iked_sa { int sa_mobike; /* MOBIKE */ int sa_frag; /* fragmentation */ - int sa_use_transport_mode; /* peer requested */ - int sa_used_transport_mode; /* we enabled */ + int sa_use_transport_mode; /* peer requested */ + int sa_used_transport_mode; /* we enabled */ struct iked_timer sa_timer; /* SA timeouts */ #define IKED_IKE_SA_EXCHANGE_TIMEOUT 300 /* 5 minutes */ diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c index ffbdfd213b1..2dc218f615d 100644 --- a/sbin/iked/ikev2.c +++ b/sbin/iked/ikev2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2.c,v 1.339 2021/11/30 17:47:30 tobhe Exp $ */ +/* $OpenBSD: ikev2.c,v 1.340 2021/12/01 16:42:12 deraadt Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -3095,7 +3095,7 @@ ikev2_handle_notifies(struct iked *env, struct iked_message *msg) case IKEV2_EXCHANGE_CREATE_CHILD_SA: if (!(sa->sa_stateflags & IKED_REQ_CHILDSA)) { log_debug("%s: IKED_REQ_CHILDSA missing", - __func__); + __func__); return (-1); } sa->sa_stateflags &= ~IKED_REQ_CHILDSA; @@ -4525,7 +4525,7 @@ ikev2_ikesa_enable(struct iked *env, struct iked_sa *sa, struct iked_sa *nsa) nsa->sa_cp_dns = sa->sa_cp_dns; sa->sa_cp_dns = NULL; /* Transfer other attributes */ - if (sa->sa_dstid_entry_valid) { + if (sa->sa_dstid_entry_valid) { sa_dstid_remove(env, sa); sa_dstid_insert(env, nsa); } @@ -6939,7 +6939,7 @@ ikev2_cp_setaddr_pool(struct iked *env, struct iked_sa *sa, return (-1); } if (RB_FIND(iked_addrpool, &env->sc_addrpool, - &key)) { + &key)) { *errstr = "requested addr in use"; return (-1); } @@ -7161,7 +7161,7 @@ ikev2_update_sa_addresses(struct iked *env, struct iked_sa *sa) if ((ipcomp = csa->csa_bundled) != NULL && ipcomp->csa_loaded) if (pfkey_sa_update_addresses(env, ipcomp) - != 0) + != 0) log_debug("%s: failed to update sa", __func__); } diff --git a/sbin/iked/ikev2_msg.c b/sbin/iked/ikev2_msg.c index 2d96f448360..0f47eb41cfa 100644 --- a/sbin/iked/ikev2_msg.c +++ b/sbin/iked/ikev2_msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2_msg.c,v 1.83 2021/11/29 06:43:42 deraadt Exp $ */ +/* $OpenBSD: ikev2_msg.c,v 1.84 2021/12/01 16:42:13 deraadt Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -793,11 +793,11 @@ ikev2_send_encrypted_fragments(struct iked *env, struct iked_sa *sa, struct ikev2_frag_payload *frag; sa_family_t sa_fam; size_t ivlen, integrlen, blocklen; - size_t max_len, left, offset=0; + size_t max_len, left, offset=0; size_t frag_num = 1, frag_total; uint8_t *data; uint32_t msgid; - int ret = -1; + int ret = -1; if (sa == NULL || sa->sa_encr == NULL || @@ -816,7 +816,7 @@ ikev2_send_encrypted_fragments(struct iked *env, struct iked_sa *sa, integrlen = hash_length(sa->sa_integr); max_len = (sa_fam == AF_INET ? IKEV2_MAXLEN_IPV4_FRAG : IKEV2_MAXLEN_IPV6_FRAG) - - ivlen - blocklen - integrlen; + - ivlen - blocklen - integrlen; /* Total number of fragments to send */ frag_total = (left / max_len) + 1; @@ -834,7 +834,7 @@ ikev2_send_encrypted_fragments(struct iked *env, struct iked_sa *sa, /* IKE header */ if ((hdr = ikev2_add_header(buf, sa, resp.msg_msgid, IKEV2_PAYLOAD_SKF, exchange, response ? IKEV2_FLAG_RESPONSE - : 0)) == NULL) + : 0)) == NULL) goto done; /* Payload header */ diff --git a/sbin/iked/ikev2_pld.c b/sbin/iked/ikev2_pld.c index 027a87a89ff..5f88fed6a86 100644 --- a/sbin/iked/ikev2_pld.c +++ b/sbin/iked/ikev2_pld.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2_pld.c,v 1.121 2021/11/27 21:50:05 tobhe Exp $ */ +/* $OpenBSD: ikev2_pld.c,v 1.122 2021/12/01 16:42:13 deraadt Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -1061,7 +1061,7 @@ ikev2_pld_notify(struct iked *env, struct ikev2_payload *pld, return (-1); } if (ikev2_nat_detection(env, msg, md, sizeof(md), type, - ikev2_msg_frompeer(msg)) == -1) + ikev2_msg_frompeer(msg)) == -1) return (-1); if (memcmp(buf, md, left) != 0) { log_debug("%s: %s detected NAT", __func__, @@ -1338,7 +1338,7 @@ ikev2_pld_notify(struct iked *env, struct ikev2_payload *pld, if (left < sizeof(signature_hash) || left % sizeof(signature_hash)) { log_debug("%s: malformed signature hash notification" - "(%zu bytes)", __func__, left); + "(%zu bytes)", __func__, left); return (0); } while (left >= sizeof(signature_hash)) { @@ -1603,7 +1603,7 @@ ikev2_pld_ef(struct iked *env, struct ikev2_payload *pld, uint8_t *buf; struct ibuf *e = NULL; size_t frag_num, frag_total; - size_t len; + size_t len; int ret = -1; ssize_t elen; @@ -1630,13 +1630,13 @@ ikev2_pld_ef(struct iked *env, struct ikev2_payload *pld, goto done; } log_debug("%s: Received fragment: %zu of %zu", - __func__, frag_num, frag_total); + __func__, frag_num, frag_total); /* Drop fragment if frag_num and frag_total don't match */ if (frag_num > frag_total) goto done; - /* Decrypt fragment */ + /* Decrypt fragment */ if ((e = ibuf_new(buf, len)) == NULL) goto done; diff --git a/sbin/iked/parse.y b/sbin/iked/parse.y index eb99b0a7dd8..881d4aa901c 100644 --- a/sbin/iked/parse.y +++ b/sbin/iked/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.137 2021/11/20 20:44:33 tobhe Exp $ */ +/* $OpenBSD: parse.y,v 1.138 2021/12/01 16:42:13 deraadt Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -668,7 +668,7 @@ protoval : STRING { } ; -rdomain : /* empty */ { $$ = -1; } +rdomain : /* empty */ { $$ = -1; } | RDOMAIN NUMBER { if ($2 > 255 || $2 < 0) { yyerror("rdomain outside range"); @@ -2495,7 +2495,7 @@ create_ike(char *name, int af, struct ipsec_addr_wrap *ipproto, pol.pol_ipproto[i] = ipp->type; pol.pol_nipproto++; } - + pol.pol_flags = flags; pol.pol_rdomain = rdomain; memcpy(&pol.pol_auth, authtype, sizeof(struct iked_auth)); diff --git a/sbin/iked/policy.c b/sbin/iked/policy.c index 99c24c17631..fd94939a6e0 100644 --- a/sbin/iked/policy.c +++ b/sbin/iked/policy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: policy.c,v 1.88 2021/11/27 21:50:05 tobhe Exp $ */ +/* $OpenBSD: policy.c,v 1.89 2021/12/01 16:42:13 deraadt Exp $ */ /* * Copyright (c) 2020-2021 Tobias Heider <tobhe@openbsd.org> @@ -899,7 +899,7 @@ sa_dstid_remove(struct iked *env, struct iked_sa *sa) static __inline int sa_dstid_cmp(struct iked_sa *a, struct iked_sa *b) { - struct iked_id *aid = NULL, *bid = NULL; + struct iked_id *aid = NULL, *bid = NULL; size_t alen, blen; uint8_t *aptr, *bptr; diff --git a/sbin/iked/vroute.c b/sbin/iked/vroute.c index 1f2318939e4..d34f5de5ea2 100644 --- a/sbin/iked/vroute.c +++ b/sbin/iked/vroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vroute.c,v 1.14 2021/09/06 13:29:17 tobhe Exp $ */ +/* $OpenBSD: vroute.c,v 1.15 2021/12/01 16:42:13 deraadt Exp $ */ /* * Copyright (c) 2021 Tobias Heider <tobhe@openbsd.org> @@ -423,14 +423,14 @@ vroute_insertdns(struct iked *env, int ifidx, struct sockaddr *addr) { struct iked_vroute_sc *ivr = env->sc_vroute; struct vroute_dns *dns; - + dns = calloc(1, sizeof(*dns)); if (dns == NULL) fatalx("%s: calloc.", __func__); memcpy(&dns->vd_addr, addr, addr->sa_len); dns->vd_ifidx = ifidx; - + ivr->ivr_dns = dns; } |