-cp
- if((cfg = get_config_val(cl->config, publickey)))
- {
- cl->rsa_key = RSA_new();
- BN_hex2bn(&cl->rsa_key->n, cfg->data.ptr);
- BN_hex2bn(&cl->rsa_key->e, "FFFF");
- }
- else
- {
- syslog(LOG_ERR, _("No public key known for %s (%s)"), cl->name, cl->hostname);
- return -1;
- }
+
+ /* Now we can add the name to the id tree */
+
+ id_add(cl);
+
+ /* And uhr... cl->port just changed so we have to unlink it from the connection tree and re-insert... */
+
+ node = avl_unlink(connection_tree, cl);
+ cl->port = port;
+ avl_insert_node(connection_tree, node);
+
+ /* Read in the public key, so that we can send a challenge */
+
+ if(read_rsa_public_key(cl))
+ return -1;
+