comparison ui/tests/binverifytest.cpp @ 774:44fa5de02b52

(issue43) Finalize and verify binary verification for linux.
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 11 Jul 2014 16:20:27 +0200
parents be30d50bc4f0
children b1df9621c89c
comparison
equal deleted inserted replaced
773:2c69298b4188 774:44fa5de02b52
45 { 45 {
46 QVERIFY(VerifyValid != verify_binary ("fakeinst-invalid" EXE_SUFFIX, 46 QVERIFY(VerifyValid != verify_binary ("fakeinst-invalid" EXE_SUFFIX,
47 strlen("fakeinst-invalid" EXE_SUFFIX))); 47 strlen("fakeinst-invalid" EXE_SUFFIX)));
48 } 48 }
49 49
50 /* Check that a signature with a different (valid) certificate is not validated */ 50 #ifdef Q_OS_WIN
51 /* Check that a signature with a different (valid) certificate is not validated
52 * on Linux only the key is checked not the certificate */
51 void BinVerifyTest::testOtherCert() 53 void BinVerifyTest::testOtherCert()
52 { 54 {
53 QVERIFY(VerifyInvalidCertificate == verify_binary ("fakeinst-other-cert" EXE_SUFFIX, 55 QVERIFY(VerifyInvalidCertificate == verify_binary ("fakeinst-other-cert" EXE_SUFFIX,
54 strlen("fakeinst-other-cert" EXE_SUFFIX))); 56 strlen("fakeinst-other-cert" EXE_SUFFIX)));
55 } 57 }
58 #endif
56 59
57 /* Check that no signature is not validated */ 60 /* Check that no signature is not validated */
58 void BinVerifyTest::testNoSignature() 61 void BinVerifyTest::testNoSignature()
59 { 62 {
60 QVERIFY(VerifyValid != verify_binary ("fakeinst" EXE_SUFFIX, 63 QVERIFY(VerifyValid != verify_binary ("fakeinst" EXE_SUFFIX,

http://wald.intevation.org/projects/trustbridge/