allow using CryptManager without generating global keys; remove CryptMan dependency on PrefsMan
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "RageFile.h"
|
#include "RageFile.h"
|
||||||
#include "PrefsManager.h"
|
|
||||||
#include "RageFileManager.h"
|
#include "RageFileManager.h"
|
||||||
|
|
||||||
#include "libtomcrypt/src/headers/tomcrypt.h"
|
#include "libtomcrypt/src/headers/tomcrypt.h"
|
||||||
@@ -167,9 +166,10 @@ CryptManager::CryptManager()
|
|||||||
ltc_mp = ltm_desc;
|
ltc_mp = ltm_desc;
|
||||||
|
|
||||||
g_pPRNG = new PRNGWrapper( &yarrow_desc );
|
g_pPRNG = new PRNGWrapper( &yarrow_desc );
|
||||||
|
}
|
||||||
|
|
||||||
if( !PREFSMAN->m_bSignProfileData )
|
void CryptManager::GenerateGlobalKeys()
|
||||||
return;
|
{
|
||||||
//
|
//
|
||||||
// generate keys if none are available
|
// generate keys if none are available
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ public:
|
|||||||
CryptManager();
|
CryptManager();
|
||||||
~CryptManager();
|
~CryptManager();
|
||||||
|
|
||||||
|
static void GenerateGlobalKeys();
|
||||||
static void GenerateRSAKey( unsigned int keyLength, RString &sPrivKey, RString &sPubKey );
|
static void GenerateRSAKey( unsigned int keyLength, RString &sPrivKey, RString &sPubKey );
|
||||||
static void GenerateRSAKeyToFile( unsigned int keyLength, RString privFilename, RString pubFilename );
|
static void GenerateRSAKeyToFile( unsigned int keyLength, RString privFilename, RString pubFilename );
|
||||||
static void SignFileToFile( RString sPath, RString sSignatureFile = "" );
|
static void SignFileToFile( RString sPath, RString sSignatureFile = "" );
|
||||||
|
|||||||
@@ -1036,6 +1036,8 @@ int main(int argc, char* argv[])
|
|||||||
if( !GetCommandlineArgument("ExportNsisStrings") && !GetCommandlineArgument("ExportLuaInformation") )
|
if( !GetCommandlineArgument("ExportNsisStrings") && !GetCommandlineArgument("ExportLuaInformation") )
|
||||||
SONGMAN->InitAll( pLoadingWindow ); // this takes a long time
|
SONGMAN->InitAll( pLoadingWindow ); // this takes a long time
|
||||||
CRYPTMAN = new CryptManager; // need to do this before ProfileMan
|
CRYPTMAN = new CryptManager; // need to do this before ProfileMan
|
||||||
|
if( PREFSMAN->m_bSignProfileData )
|
||||||
|
CRYPTMAN->GenerateGlobalKeys();
|
||||||
MEMCARDMAN = new MemoryCardManager;
|
MEMCARDMAN = new MemoryCardManager;
|
||||||
CHARMAN = new CharacterManager;
|
CHARMAN = new CharacterManager;
|
||||||
PROFILEMAN = new ProfileManager;
|
PROFILEMAN = new ProfileManager;
|
||||||
|
|||||||
Reference in New Issue
Block a user