-char *myport;
-static io_t device_io;
-devops_t devops;
-
-char *proxyhost;
-char *proxyport;
-char *proxyuser;
-char *proxypass;
-proxytype_t proxytype;
-int autoconnect;
-
-char *scriptinterpreter;
-char *scriptextension;
-
-bool node_read_ecdsa_public_key(node_t *n) {
- if(ecdsa_active(&n->ecdsa))
- return true;
-
- splay_tree_t *config_tree;
- FILE *fp;
- char *pubname = NULL, *hcfname = NULL;
- char *p;
- bool result = false;
-
- xasprintf(&hcfname, "%s" SLASH "hosts" SLASH "%s", confbase, n->name);
-
- init_configuration(&config_tree);
- if(!read_config_file(config_tree, hcfname))
- goto exit;
-
- /* First, check for simple ECDSAPublicKey statement */
-
- if(get_config_string(lookup_config(config_tree, "ECDSAPublicKey"), &p)) {
- result = ecdsa_set_base64_public_key(&n->ecdsa, p);
- free(p);
- goto exit;
- }
-
- /* Else, check for ECDSAPublicKeyFile statement and read it */
-
- if(!get_config_string(lookup_config(config_tree, "ECDSAPublicKeyFile"), &pubname))
- xasprintf(&pubname, "%s" SLASH "hosts" SLASH "%s", confbase, n->name);
-
- fp = fopen(pubname, "r");
-
- if(!fp) {
- logger(DEBUG_ALWAYS, LOG_ERR, "Error reading ECDSA public key file `%s': %s", pubname, strerror(errno));
- goto exit;
+/// Helper function to start parsing a host config file
+static bool node_get_config(meshlink_handle_t *mesh, node_t *n, config_t *config, packmsg_input_t *in) {
+ if(!config_read(mesh, "current", n->name, config, mesh->config_key)) {
+ return false;