-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows client ask for an encryption password #334
Comments
The windows binary on the site is outdated and is not compatible with the newest fknopd. pacman -Sy mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-libtool texinfo autoconf automake git patch libtool
git clone -b2.6.10 https://github.com/mrash/fwknop.git
cd fwknop
patch -p1 < fwknop_2.6.10_mingw.patch # see below
autoreconf
./configure --disable-server --disable-execvpe --disable-fortify-source --disable-stack-protector --with-wget=wget.exe LIBS="-lwsock32 -lws2_32" LDFLAG="-no-undefined" CFLAGS="-DWIN32 -D_WINSOCK_H"
mingw32-make.exe -j4 MAKEINFO=true fwknop_2.6.10_mingw.patch diff --git a/client/log_msg.h b/client/log_msg.h
index cc17716b..3dda1614 100644
--- a/client/log_msg.h
+++ b/client/log_msg.h
@@ -38,7 +38,7 @@ enum
LOG_VERBOSITY_INFO, /*!< Constant to define a INFO message */
LOG_VERBOSITY_DEBUG, /*!< Constant to define a DEBUG message */
LOG_LAST_VERBOSITY
-} log_level_t;
+};
#define LOG_DEFAULT_VERBOSITY LOG_VERBOSITY_NORMAL /*!< Default verbosity to use */
diff --git a/client/utils.c b/client/utils.c
index 718f0b6d..af1c4ef3 100644
--- a/client/utils.c
+++ b/client/utils.c
@@ -82,6 +82,7 @@ verify_file_perms_ownership(const char *file)
*/
}
+#ifndef WIN32
if((st.st_mode & (S_IRWXU|S_IRWXG|S_IRWXO)) != (S_IRUSR|S_IWUSR))
{
log_msg(LOG_VERBOSITY_ERROR,
@@ -103,6 +104,7 @@ verify_file_perms_ownership(const char *file)
res = 0;
*/
}
+#endif
}
else
{
diff --git a/common/common.h b/common/common.h
index 54ef0b82..9063d40b 100644
--- a/common/common.h
+++ b/common/common.h
@@ -105,6 +105,14 @@
#define O_EXCL _O_EXCL
#define S_IRUSR _S_IREAD
#define S_IWUSR _S_IWRITE
+#ifndef S_ISLNK
+# ifdef S_IFLNK
+# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+# else
+# define S_ISLNK(m) 0
+# endif
+#endif /* !S_ISLNK */
+
#define PATH_SEP '\\'
// --DSS needed for VS versions before 2010
#ifndef __MINGW32__ |
多谢兄弟提供的方案,编译了大半天没通过 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When running the Windows client:
fwknop-static.exe --named-config=test1 --verbose
I get:
Enter encryption password:
Then I hit ENTER (or type whatever), and get:
Note this output does not contain those 3 lines:
The server's log is not happy:
(stanza #1) Error creating fko context: Args contain invalid data: FKO_ERROR_INVALID_DATA_HMAC_COMPAREFAIL
The configuration file is:
When I use the same configuration file and same command line on a Debian host, I'm not asked for a password, and the server's log show the authentication is ok.
The text was updated successfully, but these errors were encountered: