add auth to client server connect protocol

This commit is contained in:
ac-stef
2017-06-27 15:15:23 +02:00
parent 0148c5b9a9
commit d6af5be3da
13 changed files with 287 additions and 45 deletions
+2 -2
View File
@@ -169,9 +169,9 @@ static inline void updatemasterserver(int millis, int port, int _interm)
{
if(!lastupdatemaster || ((millis-lastupdatemaster)>40*60*1000 && (_interm || !totalclients)))
{
string servdesc, pubkey;
string servdesc; extern string servpubkey;
filtertext(servdesc, scl.servdesc_full[0] ? scl.servdesc_full : "noname", FTXT__GLOBALNAME, 20);
if(mastername[0]) requestmasterf("regserv %d %s-%s %d\n", port, servdesc, scl.ssk ? bin2hex(pubkey, scl.ssk + 32, 32) : "nokey", AC_VERSION);
if(mastername[0]) requestmasterf("regserv %d %s-%s %d\n", port, servdesc, scl.ssk ? servpubkey : "nokey", AC_VERSION);
lastupdatemaster = millis + 1;
}
}