summaryrefslogtreecommitdiff
path: root/unotest
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-07-26 14:26:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-07-26 16:38:05 +0100
commit23826a28f421d82898cf52a894f6e11ca6ae1fc0 (patch)
tree4176a423e89cd190fc796831dba5f9cd28bee8fc /unotest
parent2584a460b5e560fce8719879414311b16b2c63d9 (diff)
use EDB as well as CVE as encrypted prefixes
Change-Id: I3cb1e4d736ca1627cb0716a9c17ff11b5a837264
Diffstat (limited to 'unotest')
-rw-r--r--unotest/inc/unotest/filters-test.hxx5
-rw-r--r--unotest/source/cpp/filters-test.cxx15
2 files changed, 13 insertions, 7 deletions
diff --git a/unotest/inc/unotest/filters-test.hxx b/unotest/inc/unotest/filters-test.hxx
index ab44d8170da2..73cfbe32e362 100644
--- a/unotest/inc/unotest/filters-test.hxx
+++ b/unotest/inc/unotest/filters-test.hxx
@@ -40,8 +40,9 @@ enum filterStatus
};
/*
- * NOTE, any files beginning with CVE- will be assumed to be encrypted using
- * arcfour with key 0x435645, this is to silence panicky virus/malware-checkers
+ * NOTE, any files beginning with CVE- or EDB- will be assumed to be encrypted
+ * using arcfour with key 0x435645, this is to silence panicky
+ * virus/malware-checkers
*
* e.g. m[de]crypt --bare -a arcfour -o hex -k 435645 -s 3
*/
diff --git a/unotest/source/cpp/filters-test.cxx b/unotest/source/cpp/filters-test.cxx
index 989dd33cff27..f92ce794d028 100644
--- a/unotest/source/cpp/filters-test.cxx
+++ b/unotest/source/cpp/filters-test.cxx
@@ -87,7 +87,7 @@ void FiltersTest::recursiveScan(const rtl::OUString &rFilter, const rtl::OUStrin
else
{
rtl::OUString sTmpFile;
- bool bCVE = false;
+ bool bEncrypted = false;
sal_Int32 nLastSlash = sURL.lastIndexOf('/');
@@ -97,14 +97,19 @@ void FiltersTest::recursiveScan(const rtl::OUString &rFilter, const rtl::OUStrin
if (sURL.getStr()[nLastSlash+1] == '.')
continue;
- if (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("CVE"), nLastSlash+1))
- bCVE = true;
+ if (
+ (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("CVE"), nLastSlash+1)) ||
+ (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("EDB"), nLastSlash+1))
+ )
+ {
+ bEncrypted = true;
+ }
}
rtl::OString aRes(rtl::OUStringToOString(sURL,
osl_getThreadTextEncoding()));
- if (bCVE)
+ if (bEncrypted)
{
CPPUNIT_ASSERT(osl::FileBase::E_None == osl::FileBase::createTempFile(NULL, NULL, &sTmpFile));
decode(sURL, sTmpFile);
@@ -118,7 +123,7 @@ void FiltersTest::recursiveScan(const rtl::OUString &rFilter, const rtl::OUStrin
bool bRes = load(rFilter, sURL, rUserData);
sal_uInt32 nEndTime = osl_getGlobalTimer();
- if (bCVE)
+ if (bEncrypted)
CPPUNIT_ASSERT(osl::FileBase::E_None == osl::File::remove(sTmpFile));
fprintf(stderr, "%s,%" SAL_PRIuUINT32"\n",