]> tinc-vpn.org Git - tinc/blobdiff - src/net_setup.c
Fix Windows device asynchronous write behavior.
[tinc] / src / net_setup.c
index 7f51fe4b46c938e1b9ef552c75d4e3831e9c1681..d1d5c04be36ff5bfbbe002b106551a789a1635f2 100644 (file)
@@ -137,10 +137,11 @@ bool read_ecdsa_public_key(connection_t *c) {
        }
 
        c->ecdsa = ecdsa_read_pem_public_key(fp);
-       fclose(fp);
 
-       if(!c->ecdsa)
+       if(!c->ecdsa && errno != ENOENT)
                logger(DEBUG_ALWAYS, LOG_ERR, "Parsing Ed25519 public key file `%s' failed.", fname);
+
+       fclose(fp);
        free(fname);
        return c->ecdsa;
 }