#include "utils.h"
#include "xalloc.h"
-#ifdef HAVE_MINGW
-#define SCRIPTEXTENSION ".bat"
-#else
-#define SCRIPTEXTENSION ""
-#endif
-
int addressfamily = AF_UNSPEC;
char *get_my_hostname() {
if(!f)
abort();
+ // Get the local address
+ char *address = get_my_hostname();
+
// Fill in the details.
fprintf(f, "Name = %s\n", argv[1]);
if(netname)
fclose(f);
// Create an URL from the local address, key hash and cookie
- char *address = get_my_hostname();
printf("%s/%s%s\n", address, hash, cookie);
free(filename);
free(address);
return 1;
}
- // Check if the hash of the key he have us matches the hash in the URL.
+ // Check if the hash of the key he gave us matches the hash in the URL.
char *fingerprint = line + 2;
digest_t *digest = digest_open_by_name("sha256", 18);
if(!digest)