Replace getrandom() with getentropy()
[tinc] / src / fsck.c
index e726272..70ca84d 100644 (file)
@@ -64,6 +64,7 @@ again:
        goto again;
 }
 
+static void print_tinc_cmd(const char *format, ...) ATTR_FORMAT(printf, 1, 2);
 static void print_tinc_cmd(const char *format, ...) {
        if(confbasegiven) {
                fprintf(stderr, "%s -c %s ", exe_name, confbase);
@@ -536,14 +537,11 @@ static bool check_public_keys(splay_tree_t *config, const char *name, rsa_t *rsa
                fprintf(stderr, "WARNING: cannot read %s\n", host_file);
        }
 
-       ecdsa_t *ec_pub = NULL;
-       read_ecdsa_public_key(&ec_pub, &config, name);
+       ecdsa_t *ec_pub = read_ecdsa_public_key(&config, name);
 
        bool success = true;
 #ifndef DISABLE_LEGACY
-       rsa_t *rsa_pub = NULL;
-       read_rsa_public_key(&rsa_pub, config, name);
-
+       rsa_t *rsa_pub = read_rsa_public_key(config, name);
        success = check_rsa_pubkey(rsa_priv, rsa_pub, host_file);
        rsa_free(rsa_pub);
 #endif