Files
UnrealEngineUWP/Engine/Source/Runtime/Online/SSL/Private/SslModule.cpp
Ben Marsh 20bf0eb6a1 Updating copyright notices to 2017 (copying from //Tasks/UE4/Dev-Copyright-2017).
#rb none
#lockdown Nick.Penwarden

[CL 3226823 by Ben Marsh in Main branch]
2016-12-08 08:52:44 -05:00

59 lines
1.2 KiB
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "SslModule.h"
#include "SslCertificateManager.h"
#include "Ssl.h"
#include "Misc/Parse.h"
DEFINE_LOG_CATEGORY(LogSsl);
// FHttpModule
IMPLEMENT_MODULE(FSslModule, SSL);
FSslModule* FSslModule::Singleton = NULL;
bool FSslModule::Exec(UWorld* InWorld, const TCHAR* Cmd, FOutputDevice& Ar)
{
bool bResult = false;
// Ignore any execs that don't start with HTTP
if (FParse::Command(&Cmd, TEXT("SSL")))
{
bResult = false;
}
return bResult;
}
void FSslModule::StartupModule()
{
Singleton = this;
#if WITH_SSL
CertificateManagerPtr = new FSslCertificateManager();
static_cast<FSslCertificateManager*>(CertificateManagerPtr)->BuildRootCertificateArray();
#endif //#if WITH_SSL
}
void FSslModule::ShutdownModule()
{
#if WITH_SSL
static_cast<FSslCertificateManager*>(CertificateManagerPtr)->EmptyRootCertificateArray();
delete CertificateManagerPtr;
#endif // #if WITH_SSL
Singleton = nullptr;
}
FSslModule& FSslModule::Get()
{
if (Singleton == NULL)
{
check(IsInGameThread());
FModuleManager::LoadModuleChecked<FSslModule>("SSL");
}
check(Singleton != NULL);
return *Singleton;
}