projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Typo and conversion to UTF-8.
[tinc]
/
src
/
protocol_key.c
diff --git
a/src/protocol_key.c
b/src/protocol_key.c
index
2453975
..
0ecad9b
100644
(file)
--- a/
src/protocol_key.c
+++ b/
src/protocol_key.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: protocol_key.c,v 1.1.4.1
4 2002/09/09 22:33:03
guus Exp $
+ $Id: protocol_key.c,v 1.1.4.1
6 2003/05/06 21:13:18
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-135,6
+135,7
@@
int req_key_h(connection_t *c)
if(to == myself) { /* Yes, send our own key back */
mykeyused = 1;
from->received_seqno = 0;
if(to == myself) { /* Yes, send our own key back */
mykeyused = 1;
from->received_seqno = 0;
+ memset(from->late, 0, sizeof(from->late));
send_ans_key(c, myself, from);
} else {
send_req_key(to->nexthop->connection, from, to);
send_ans_key(c, myself, from);
} else {
send_req_key(to->nexthop->connection, from, to);
@@
-253,8
+254,15
@@
int ans_key_h(connection_t *c)
from->digest = NULL;
}
from->digest = NULL;
}
+ if(compression < 0 || compression > 11) {
+ syslog(LOG_ERR, _("Node %s (%s) uses bogus compression level!"), from->name, from->hostname);
+ return -1;
+ }
+
from->compression = compression;
from->compression = compression;
+ EVP_EncryptInit_ex(&from->packet_ctx, from->cipher, NULL, from->key, from->key + from->cipher->key_len);
+
flush_queue(from);
return 0;
flush_queue(from);
return 0;