X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_key.c;h=0cf33d7078abc363d2816b1751ec890c38c1b3cf;hb=f02d3ed3e135b5326003e7f69f8331ff6a3cc219;hp=591bb66026d024b8a3e7b017496286563cca116e;hpb=af95368c0f30955f0e13b587d5d6d4989fd5a83e;p=tinc diff --git a/src/protocol_key.c b/src/protocol_key.c index 591bb660..0cf33d70 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -1,7 +1,7 @@ /* protocol_key.c -- handle the meta-protocol, key exchange - Copyright (C) 1999-2005 Ivo Timmermans , - 2000-2005 Guus Sliepen + Copyright (C) 1999-2005 Ivo Timmermans, + 2000-2006 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -37,8 +37,7 @@ bool mykeyused = false; -bool send_key_changed(connection_t *c, const node_t *n) -{ +bool send_key_changed(connection_t *c, const node_t *n) { cp(); /* Only send this message if some other daemon requested our key previously. @@ -51,8 +50,7 @@ bool send_key_changed(connection_t *c, const node_t *n) return send_request(c, "%d %lx %s", KEY_CHANGED, random(), n->name); } -bool key_changed_h(connection_t *c) -{ +bool key_changed_h(connection_t *c) { char name[MAX_STRING_SIZE]; node_t *n; @@ -86,15 +84,13 @@ bool key_changed_h(connection_t *c) return true; } -bool send_req_key(connection_t *c, const node_t *from, const node_t *to) -{ +bool send_req_key(connection_t *c, const node_t *from, const node_t *to) { cp(); return send_request(c, "%d %s %s", REQ_KEY, from->name, to->name); } -bool req_key_h(connection_t *c) -{ +bool req_key_h(connection_t *c) { char from_name[MAX_STRING_SIZE]; char to_name[MAX_STRING_SIZE]; node_t *from, *to; @@ -140,8 +136,7 @@ bool req_key_h(connection_t *c) return true; } -bool send_ans_key(connection_t *c, const node_t *from, const node_t *to) -{ +bool send_ans_key(connection_t *c, const node_t *from, const node_t *to) { char *key; cp(); @@ -157,8 +152,7 @@ bool send_ans_key(connection_t *c, const node_t *from, const node_t *to) from->compression); } -bool ans_key_h(connection_t *c) -{ +bool ans_key_h(connection_t *c) { char from_name[MAX_STRING_SIZE]; char to_name[MAX_STRING_SIZE]; char key[MAX_STRING_SIZE];