Backport fixes from trunk since revision 1555.
[tinc] / src / protocol_auth.c
index 46bb6e6..1fb37fc 100644 (file)
@@ -207,7 +207,7 @@ bool metakey_h(connection_t *c, char *request) {
        /* Decrypt the meta key */
 
        if(!rsa_private_decrypt(&myself->connection->rsa, enckey, len, key)) {
-               logger(LOG_ERR, _("Error during encryption of meta key for %s (%s)"), c->name, c->hostname);
+               logger(LOG_ERR, _("Error during decryption of meta key for %s (%s)"), c->name, c->hostname);
                return false;
        }
 
@@ -335,6 +335,7 @@ bool chal_reply_h(connection_t *c, char *request) {
         */
 
        free(c->hischallenge);
+       c->hischallenge = NULL;
        c->allow_request = ACK;
 
        return send_ack(c);