projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix compiler warning.
[tinc]
/
src
/
protocol_auth.c
diff --git
a/src/protocol_auth.c
b/src/protocol_auth.c
index
12dc144
..
0049cd9
100644
(file)
--- a/
src/protocol_auth.c
+++ b/
src/protocol_auth.c
@@
-1,7
+1,7
@@
/*
protocol_auth.c -- handle the meta-protocol, authentication
Copyright (C) 1999-2005 Ivo Timmermans,
/*
protocol_auth.c -- handle the meta-protocol, authentication
Copyright (C) 1999-2005 Ivo Timmermans,
- 2000-20
17
Guus Sliepen <guus@tinc-vpn.org>
+ 2000-20
22
Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-46,6
+46,9
@@
#include "ed25519/sha512.h"
#include "keys.h"
#include "ed25519/sha512.h"
#include "keys.h"
+/* If nonzero, use null ciphers and skip all key exchanges. */
+bool bypass_security = false;
+
int invitation_lifetime;
ecdsa_t *invitation_key = NULL;
int invitation_lifetime;
ecdsa_t *invitation_key = NULL;
@@
-287,7
+290,12
@@
static bool receive_invitation_sptps(void *handle, uint8_t type, const void *dat
// Read the new node's Name from the file
char buf[1024] = "";
// Read the new node's Name from the file
char buf[1024] = "";
- fgets(buf, sizeof(buf), f);
+
+ if(!fgets(buf, sizeof(buf), f)) {
+ logger(DEBUG_ALWAYS, LOG_ERR, "Could not read invitation file %s\n", cookie);
+ return false;
+ }
+
size_t buflen = strlen(buf);
// Strip whitespace at the end
size_t buflen = strlen(buf);
// Strip whitespace at the end