X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol_auth.c;h=59cab66f85aced6f7947344cfd258924891adac0;hp=f8a15be82ce285867e0d4e0ecfcc65ff5cd8a4b5;hb=38c2d6c1dae3f09c68baa37fd24caa2e0ec6d8ad;hpb=de78d79db84c486afcc353884ec1770866beb653 diff --git a/src/protocol_auth.c b/src/protocol_auth.c index f8a15be8..59cab66f 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -1,7 +1,7 @@ /* protocol_auth.c -- handle the meta-protocol, authentication Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2007 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 @@ -68,9 +68,9 @@ bool id_h(connection_t *c) return false; } - /* If we set c->name in advance, make sure we are connected to the right host */ + /* If this is an outgoing connection, make sure we are connected to the right host */ - if(c->name) { + if(c->outgoing) { if(strcmp(c->name, name)) { logger(LOG_ERR, _("Peer %s is %s instead of %s"), c->hostname, name, c->name); @@ -240,7 +240,7 @@ bool metakey_h(connection_t *c) /* Decrypt the meta key */ if(RSA_private_decrypt(len, (unsigned char *)buffer, (unsigned char *)c->inkey, myself->connection->rsa_key, RSA_NO_PADDING) != len) { /* See challenge() */ - logger(LOG_ERR, _("Error during encryption of meta key for %s (%s)"), + logger(LOG_ERR, _("Error during decryption of meta key for %s (%s)"), c->name, c->hostname); return false; }