From f4e683fc6bd6ac76f9979f49d737588b6ddf16b0 Mon Sep 17 00:00:00 2001
From: gcontini <1121667+gcontini@users.noreply.github.com>
Date: 周六, 14 11月 2020 22:13:13 +0800
Subject: [PATCH] windows smbios

---
 src/library/os/windows/signature_verifier.cpp |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/library/os/windows/signature_verifier.cpp b/src/library/os/windows/signature_verifier.cpp
index a99894b..083845e 100644
--- a/src/library/os/windows/signature_verifier.cpp
+++ b/src/library/os/windows/signature_verifier.cpp
@@ -29,7 +29,7 @@
 using namespace std;
 #define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
 
-static const void formatError(DWORD status, const char* description) {
+static const void formatError(DWORD status, const char *description) {
 	char msgBuffer[256];
 	FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, status, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), &msgBuffer[0],
 				  sizeof(msgBuffer) - 1, nullptr);
@@ -124,7 +124,7 @@
 												sizeof(pubk), 0))) {
 		result = FUNC_RET_OK;
 	} else {
-#ifdef _DEBUG
+#ifndef NDEBUG
 		formatError(status, "error importing public key");
 #endif
 	}
@@ -152,7 +152,7 @@
 				result = FUNC_RET_OK;
 			} else {
 				result = FUNC_RET_ERROR;
-#ifdef _DEBUG
+#ifndef NDEBUG
 				formatError(status, "error verifying signature");
 #endif
 			}
@@ -162,7 +162,7 @@
 	}
 	else {
 		result = FUNC_RET_NOT_AVAIL;
-#ifdef _DEBUG
+#ifndef NDEBUG
 		formatError(status, "error opening RSA provider");
 #endif
 	}
@@ -207,13 +207,13 @@
 					result = verifyHash(pbHashData, cbHashDataLenght, signatureB64);
 				} else {
 					result = FUNC_RET_NOT_AVAIL;
-#ifdef _DEBUG
+#ifndef NDEBUG
 					formatError(status, "error hashing data");
 #endif
 				}
 			} else {
 				result = FUNC_RET_NOT_AVAIL;
-#ifdef _DEBUG
+#ifndef NDEBUG
 				formatError(status, "error creating hash");
 #endif
 			}
@@ -223,7 +223,7 @@
 		}
 	} else {
 		result = FUNC_RET_NOT_AVAIL;
-#ifdef _DEBUG
+#ifndef NDEBUG
 		formatError(status, "**** Error returned by BCryptGetProperty");
 #endif
 	}

--
Gitblit v1.9.1