This commit is contained in:
Brian Cox 2016-03-26 23:26:08 -07:00
commit 2c0c061421
4 changed files with 45 additions and 8 deletions

View File

@ -4,10 +4,10 @@
(see http://www.linuxfromscratch.org/blfs/view/svn/postlfs/tripwire.html )
* Absorb fixes from FreeBSD ports patchset
(see http://svnweb.freebsd.org/ports/head/security/tripwire/ )
* Fix handling of SHA hashes when not built to use OpenSSL implementation
* Fix handling of SHA hashes (with and without OpenSSL hash impl.)
* Update GNU config.guess & config.sub to current versions
* Compilation fixes for assorted platforms
(Mac OS X, OpenBSD, OpenSolaris, Cygwin, Minix 3.x, GNU/Hurd, Haiku, Syllable)
(Mac OS X, OpenBSD, OpenSolaris, Cygwin, Minix 3.x, GNU/Hurd, Haiku, Syllable, SkyOS)
* Added script to bump buildys file timestaps, to fix
spurious aclocal/automake errors on a fresh clone/untar/etc.

43
src/fco/signature.cpp Normal file → Executable file
View File

@ -627,7 +627,7 @@ void cSHASignature::Finit()
TSTRING cSHASignature::AsString(void) const
{
TSTRING ret;
char*
char* ps_signature;
char buf[100];
int length;
@ -642,7 +642,6 @@ TSTRING cSHASignature::AsString(void) const
ret.append(ps_signature);
#endif
return ret;
//return ret;
}
TSTRING cSHASignature::AsStringHex() const
@ -664,6 +663,43 @@ TSTRING cSHASignature::AsStringHex() const
return ret;
}
///////////////////////////////////////////////////////////////////////////////
// Copy -- Copies a new sig value from a base pointer
void cSHASignature::Copy(const iFCOProp* rhs)
{
ASSERT(GetType() == rhs->GetType());
for (int i = 0; i<SIG_UINT32_SIZE; ++i)
sha_digest[i] = ((static_cast<const cSHASignature*>(rhs))->sha_digest)[i];
}
///////////////////////////////////////////////////////////////////////////////
// Serializer Implementation: Read and Write
void cSHASignature::Read (iSerializer* pSerializer, int32 version)
{
if (version > Version())
ThrowAndAssert(eSerializerVersionMismatch(_T("SHA Read")));
for (int i = 0; i < SIG_UINT32_SIZE; ++i)
pSerializer->ReadInt32((int32&)sha_digest[i]);
}
void cSHASignature::Write(iSerializer* pSerializer) const
{
for (int i = 0; i < SIG_UINT32_SIZE; ++i)
pSerializer->WriteInt32(sha_digest[i]);
}
///////////////////////////////////////////////////////////////////////////////
// IsEqual -- Tests for equality, given a base pointer (iSignature)
bool cSHASignature::IsEqual(const iSignature& rhs) const
{
if (this == &rhs)
return true;
else {
return (memcmp(sha_digest, ((cSHASignature&)rhs).sha_digest, SIG_UINT32_SIZE * sizeof(uint32)) == 0);
}
}
#else // HAVE_OPENSSL_SHA_H
TSTRING cSHASignature::AsString(void) const
@ -704,7 +740,6 @@ TSTRING cSHASignature::AsStringHex() const
return ret;
}
#endif
///////////////////////////////////////////////////////////////////////////////
// Copy -- Copies a new sig value from a base pointer
@ -742,7 +777,7 @@ bool cSHASignature::IsEqual(const iSignature& rhs) const
return (memcmp(mSHAInfo.digest, ((cSHASignature&)rhs).mSHAInfo.digest, SIG_UINT32_SIZE * sizeof(uint32)) == 0);
}
}
#endif
///////////////////////////////////////////////////////////////////////////////
// class cHAVALSignature --
///////////////////////////////////////////////////////////////////////////////

View File

@ -91,9 +91,11 @@ void cSyslog::Log(const TCHAR* programName, cSyslog::LogType logType, const TCHA
const char* msg = message;
#endif
#ifndef SKYOS // Handle an oddball OS that has syslog.h but doesn't implement the calls.
openlog(ident, LOG_PID, LOG_USER);
syslog(LOG_NOTICE, "%s", msg);
closelog();
#endif
#elif SUPPORTS_EVENTLOG

View File

@ -149,9 +149,9 @@ post
- Bumping version to 2.4.3.0
- Compilation fixes for gcc 4.7+ and LLVM/clang (see http://www.linuxfromscratch.org/blfs/view/svn/postlfs/tripwire.html )
- Absorb fixes from FreeBSD ports patchset (see http://svnweb.freebsd.org/ports/head/security/tripwire/ )
- Fix handling of SHA hashes when not using OpenSSL impl
- Fix handling of SHA hashes (with and without OpenSSL hash impl.)
- Update GNU config.guess & config.sub to current versions
- Compilation fixes for assorted platforms (Mac OS X, OpenBSD, OpenSolaris, Cygwin, Minix 3.x, GNU/Hurd, Haiku, Syllable)
- Compilation fixes for assorted platforms (Mac OS X, OpenBSD, OpenSolaris, Cygwin, Minix 3.x, GNU/Hurd, Haiku, Syllable, SkyOS)
- Added script to bump buildys file timestaps, to fix spurious aclocal/automake errors on a fresh clone/untar/etc.
* Mon Nov 21 2011 Stephane Dudzinski <tripwire@frlinux.net> 2.4.2.2