Permalink
Browse files

log message

  • Loading branch information...
1 parent b756de0 commit 5586aa296c89d9cfe0514384c6fadc04c824886e @thehappyhippo thehappyhippo committed Jan 5, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/Makefile
  2. +2 −2 src/passphrase.c
View
@@ -41,7 +41,7 @@ OBJS = main.obj \
openvpn-gui-$(RES_LANG).res
INCLUDE_DIRS = -I.
-LIB_DIRS = /NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt /DEFAULTLIB:user32 /DEFAULTLIB:Advapi32 /DEFAULTLIB:WinInet /DEFAULTLIB:shell32
+LIB_DIRS = /DEFAULTLIB:libcmt /DEFAULTLIB:user32 /DEFAULTLIB:Advapi32 /DEFAULTLIB:WinInet /DEFAULTLIB:shell32
WARNS = -W -Wall -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast \
-Wcast-align -Wwrite-strings -Wconversion -Wsign-compare \
View
@@ -84,7 +84,7 @@ void CheckPrivateKeyPassphrasePrompt (char *line, int config)
if (wcslen(passphrase) > 0)
{
CLEAR(passphrase_ascii);
- WideCharToMultiByte(CP_850,WC_ERR_INVALID_CHARS,passphrase,sizeof(passphrase)/sizeof(WCHAR),passphrase_ascii,sizeof(passphrase_ascii),NULL,NULL);
+ ConvertUnicode2Ascii(passphrase, passphrase_ascii, sizeof(passphrase_ascii));
if (!WriteFile(o.cnn[config].hStdIn, passphrase_ascii,
strlen(passphrase_ascii), &nCharsWritten, NULL))
@@ -120,7 +120,7 @@ void CheckPrivateKeyPassphrasePrompt (char *line, int config)
if (wcslen(passphrase) > 0)
{
CLEAR(passphrase_ascii);
- WideCharToMultiByte(CP_850,WC_ERR_INVALID_CHARS,passphrase,sizeof(passphrase)/sizeof(WCHAR),passphrase_ascii,sizeof(passphrase_ascii),NULL,NULL);
+ ConvertUnicode2Ascii(passphrase, passphrase_ascii, sizeof(passphrase_ascii));
if (!WriteFile(o.cnn[config].hStdIn, passphrase_ascii,
strlen(passphrase_ascii), &nCharsWritten, NULL))

0 comments on commit 5586aa2

Please sign in to comment.