From da00ff6db5e68773996ec79d711c45fb3444c580 Mon Sep 17 00:00:00 2001 From: NingSun Date: Wed, 14 Mar 2018 16:35:31 -0700 Subject: 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 --- SoftHSMv2/src/lib/win32/syslog.cpp | 69 -------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 SoftHSMv2/src/lib/win32/syslog.cpp (limited to 'SoftHSMv2/src/lib/win32/syslog.cpp') diff --git a/SoftHSMv2/src/lib/win32/syslog.cpp b/SoftHSMv2/src/lib/win32/syslog.cpp deleted file mode 100644 index 927592e..0000000 --- a/SoftHSMv2/src/lib/win32/syslog.cpp +++ /dev/null @@ -1,69 +0,0 @@ -#include - -#include -#include -#include -#include -#include - -#ifdef _WIN32 - -static HANDLE hEventLog = NULL; - -/* - * Close the Handle to the application Event Log - */ -void -closelog() { - DeregisterEventSource(hEventLog); -} - -/* - * Initialize event logging - */ -void -openlog(const char *ident, int logopt, int facility) { - /* Get a handle to the Application event log */ - hEventLog = RegisterEventSourceA(NULL, ident); -} - -/* - * Log to the NT Event Log - */ -void -syslog(int priority, const char *message, ...) { - va_list ap; - char buf[1024]; - LPCSTR str[1]; - - str[0] = buf; - - va_start(ap, message); - vsprintf(buf, message, ap); - va_end(ap); - - /* Make sure that the channel is open to write the event */ - if (hEventLog == NULL) { - openlog("SoftHSM", 0, 0); - } - if (hEventLog != NULL) { - switch (priority) { - case LOG_INFO: - case LOG_NOTICE: - case LOG_DEBUG: - ReportEventA(hEventLog, EVENTLOG_INFORMATION_TYPE, 0, - 0x40000003, NULL, 1, 0, str, NULL); - break; - case LOG_WARNING: - ReportEventA(hEventLog, EVENTLOG_WARNING_TYPE, 0, - 0x80000002, NULL, 1, 0, str, NULL); - break; - default: - ReportEventA(hEventLog, EVENTLOG_ERROR_TYPE, 0, - 0xc0000001, NULL, 1, 0, str, NULL); - break; - } - } -} - -#endif -- cgit 1.2.3-korg