summaryrefslogtreecommitdiffstats
path: root/src/wireguard.h
diff options
context:
space:
mode:
authorMatt Dunwoodie <ncon@mail.noconroy.net>2019-06-12 22:41:03 +1000
committerMatt Dunwoodie <ncon@mail.noconroy.net>2019-06-12 22:56:49 +1000
commit8c489fced422e325a9f4eaa664f9e749915bf76d (patch)
tree2ba5e24ce14d83e3d1e72bff0bb699daba3bd392 /src/wireguard.h
parentstaging2 (diff)
downloadwireguard-openbsd-8c489fced422e325a9f4eaa664f9e749915bf76d.tar.xz
wireguard-openbsd-8c489fced422e325a9f4eaa664f9e749915bf76d.zip
staging3
Diffstat (limited to 'src/wireguard.h')
-rw-r--r--src/wireguard.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wireguard.h b/src/wireguard.h
index 992ccc69305..7a8edf0a064 100644
--- a/src/wireguard.h
+++ b/src/wireguard.h
@@ -19,7 +19,7 @@
#define WG_ARB_BITS (1<<10) /* 1024 bitmap (960 usable) */
#define WG_ENCRYPTED_SIZE(n) ((n) + WG_MAC_SIZE)
-#define WG_PADDED_SIZE(n) ((WG_MSG_PADDING_SIZE - (n)) % WG_MSG_PADDING_SIZE)
+#define WG_PADDING_SIZE(n) ((WG_MSG_PADDING_SIZE - (n)) % WG_MSG_PADDING_SIZE)
#define WG_ENCRYPTED_PADDED_SIZE(n) WG_ENCRYPTED_SIZE(WG_PADDED_SIZE(n))
/* Constant for session */
@@ -139,6 +139,7 @@ struct wg_msg_initiation_helper {
void *ih_arg;
struct wg_conn *(*ih_keylookup)(void *, uint8_t *);
uint8_t *ih_pubkey, *ih_privkey;
+ struct wg_conn *ih_conn;
};
void wg_conn_init(struct wg_conn *);
@@ -155,7 +156,7 @@ int wg_conn_recv_response(struct wg_conn *, struct wg_msg_response *);
int wg_conn_recv_cookie(struct wg_conn *, struct wg_msg_cookie *);
int wg_conn_decrypt(struct wg_conn *, struct wg_msg_transport *, size_t);
-int wg_conn_promote_handshake(struct wg_conn *);
+int wg_conn_handshake_finish(struct wg_conn *);
int wg_conn_reject_tx(struct wg_conn *);