#include "control.h"
#include "control_common.h"
#include "cipher.h"
-#include "crypto.h"
#include "digest.h"
#include "ecdsa.h"
#include "edge.h"
#include "sptps.h"
#include "utils.h"
#include "xalloc.h"
+#include "random.h"
#include "ed25519/sha512.h"
#include "keys.h"
if(!fgets(buf, sizeof(buf), f)) {
logger(DEBUG_ALWAYS, LOG_ERR, "Could not read invitation file %s\n", cookie);
+ fclose(f);
return false;
}
sptps_send_record(&c->sptps, 0, buf, result);
}
+ if(!feof(f)) {
+ logger(DEBUG_ALWAYS, LOG_ERR, "Could not read invitation file %s\n", cookie);
+ fclose(f);
+ return false;
+ }
+
sptps_send_record(&c->sptps, 1, buf, 0);
fclose(f);
unlink(usedname);