diff options
author | NingSun <ning.sun@intel.com> | 2018-03-14 16:35:31 -0700 |
---|---|---|
committer | NingSun <ning.sun@intel.com> | 2018-03-14 17:02:47 -0700 |
commit | da00ff6db5e68773996ec79d711c45fb3444c580 (patch) | |
tree | 0387aa1f70a468e6c3264767454ae6f4528f59e8 /SoftHSMv2/src/bin/win32/getpassphase.cpp | |
parent | 535535b7c5f2781fa096a5fd00a762d24db4eddc (diff) |
Remove win32 support in SoftHSMv2
Due to license issue, we have to remove win32 support in SoftHSMv2.
Issue-ID: AAF-151
Change-Id: I31dda45ed84065819e26be8205747dd096a37432
Signed-off-by: NingSun <ning.sun@intel.com>
Diffstat (limited to 'SoftHSMv2/src/bin/win32/getpassphase.cpp')
-rw-r--r-- | SoftHSMv2/src/bin/win32/getpassphase.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/SoftHSMv2/src/bin/win32/getpassphase.cpp b/SoftHSMv2/src/bin/win32/getpassphase.cpp deleted file mode 100644 index 9d8aaca..0000000 --- a/SoftHSMv2/src/bin/win32/getpassphase.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* WIN32 getpassphrase */ - -#include <config.h> -#include <stdio.h> - -char * -getpassphrase(const char *prompt) { - static char buf[128]; - HANDLE h; - DWORD cc, mode; - int cnt; - - h = GetStdHandle(STD_INPUT_HANDLE); - fputs(prompt, stderr); - fflush(stderr); - fflush(stdout); - FlushConsoleInputBuffer(h); - GetConsoleMode(h, &mode); - SetConsoleMode(h, ENABLE_PROCESSED_INPUT); - - for (cnt = 0; cnt < sizeof(buf) - 1; cnt++) - { - ReadFile(h, buf + cnt, 1, &cc, NULL); - if (buf[cnt] == '\r') - break; - fputc('*', stdout); - fflush(stderr); - fflush(stdout); - } - - SetConsoleMode(h, mode); - buf[cnt] = '\0'; - fputs("\n", stderr); - return (buf); -} |