remove unused
This commit is contained in:
@@ -24,11 +24,6 @@ bool CryptManager::VerifyFileWithFile( RString sPath, RString sSignatureFile )
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CryptManager::Verify( RString sPath, RString sSignature )
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// crypt headers
|
// crypt headers
|
||||||
@@ -191,34 +186,6 @@ bool CryptManager::VerifyFileWithFile( RString sPath, RString sSignatureFile, RS
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CryptManager::Verify( RString sPath, RString sSignature )
|
|
||||||
{
|
|
||||||
ASSERT( PREFSMAN->m_bSignProfileData );
|
|
||||||
|
|
||||||
RString sPublicKeyFile = PUBLIC_KEY_PATH;
|
|
||||||
RString sMessageFilename = sPath;
|
|
||||||
|
|
||||||
RString sPublicKey;
|
|
||||||
if( !GetFileContents(sPublicKeyFile, sPublicKey) )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
RageFile file;
|
|
||||||
if( !file.Open(sPath) )
|
|
||||||
{
|
|
||||||
LOG->Warn( "Verify: open(%s) failed: %s", sPath.c_str(), file.GetError().c_str() );
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
RString sError;
|
|
||||||
if( !CryptHelpers::VerifyFile(file, sSignature, sPublicKey, sError) )
|
|
||||||
{
|
|
||||||
LOG->Warn( "Verify(%s) failed: %s", sPath.c_str(), sError.c_str() );
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RString CryptManager::GetMD5ForFile( RString fn )
|
RString CryptManager::GetMD5ForFile( RString fn )
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ public:
|
|||||||
static bool VerifyFileWithFile( RString sPath, RString sSignatureFile, RString sPublicKeyFile );
|
static bool VerifyFileWithFile( RString sPath, RString sSignatureFile, RString sPublicKeyFile );
|
||||||
|
|
||||||
static RString Sign( RString sPath );
|
static RString Sign( RString sPath );
|
||||||
static bool Verify( RString sPath, RString sSignature );
|
|
||||||
|
|
||||||
static RString GetMD5ForFile( RString fn ); // in Hex
|
static RString GetMD5ForFile( RString fn ); // in Hex
|
||||||
static RString GetMD5ForString( RString sData ); // in Hex
|
static RString GetMD5ForString( RString sData ); // in Hex
|
||||||
|
|||||||
Reference in New Issue
Block a user