From 2759cc799efe6672361dc9633426f5caff03ae6f Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Fri, 11 Jan 2019 16:13:44 -0800 Subject: [PATCH] Fixed preprocessor, so compiled correctly if OpenSSL is not linked --- meshconsole/main.c | 3 ++- meshcore/agentcore.c | 4 +++- meshcore/wincrypto.cpp | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/meshconsole/main.c b/meshconsole/main.c index 53f4a45..be9fd7f 100644 --- a/meshconsole/main.c +++ b/meshconsole/main.c @@ -121,8 +121,9 @@ char* crashMemory = ILib_POSIX_InstallCrashHandler(argv[0]); if (argc > 1 && strcasecmp(argv[1], "-info") == 0) { printf("Compiled on: %s, %s\n", __TIME__, __DATE__); +#ifndef MICROSTACK_NOTLS printf("Using %s\n", SSLeay_version(SSLEAY_VERSION)); - +#endif return(0); } diff --git a/meshcore/agentcore.c b/meshcore/agentcore.c index 05e633b..d867ae7 100644 --- a/meshcore/agentcore.c +++ b/meshcore/agentcore.c @@ -336,7 +336,7 @@ void MeshServer_Connect(MeshAgentHostContainer *agent); void MeshServer_ProcessCommand(ILibWebClient_StateObject wcdo, MeshAgentHostContainer *agent, char *buffer, int bufferLen); char ContainerContextGUID[sizeof(JS_ENGINE_CONTEXT) + 1]; void MeshServer_ConnectEx(MeshAgentHostContainer *agent); - +int agent_VerifyMeshCertificates(MeshAgentHostContainer *agent); void MeshAgent_sendConsoleText(duk_context *ctx, char *txt) { @@ -2418,7 +2418,9 @@ void MeshServer_OnResponse(ILibWebClient_StateObject WebStateObject, int Interru break; case ILibWebClient_ReceiveStatus_Connection_Established: // New connection established. { +#ifndef MICROSTACK_NOTLS int len; +#endif int idleLen; if ((idleLen = ILibSimpleDataStore_Get(agent->masterDb, "controlChannelIdleTimeout", NULL, 0)) != 0) { diff --git a/meshcore/wincrypto.cpp b/meshcore/wincrypto.cpp index 12e1887..1b884f2 100644 --- a/meshcore/wincrypto.cpp +++ b/meshcore/wincrypto.cpp @@ -17,7 +17,7 @@ limitations under the License. // When compiled in 32bit, this module uses Windows CAPI which is compatible with Windows XP. // When compiled in 64bit, this module uses Windows CNG (Crypto Next Gen) that is compatible and will use TPM modules. -#if !defined(_NOCAPI) && defined(WIN32) +#if !defined(_NOCAPI) && defined(WIN32) && !defined(MICROSTACK_NOTLS) #include #include