annotate ui/tests/certlistparsertest.h @ 1395:a2574a029322

Fix Base 64 signature size calculation. If the signature byte size is not equally dividable by three the base 64 encoding needs three additional bytes. The value is now fixed to avoid such errors in the future.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 26 Jan 2015 13:17:32 +0100
parents 17e1c8f37d72
children
rev   line source
404
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 351
diff changeset
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 351
diff changeset
2 * Software engineering by Intevation GmbH
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 351
diff changeset
3 *
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 351
diff changeset
4 * This file is Free Software under the GNU GPL (v>=2)
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 351
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY!
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 351
diff changeset
6 * See LICENSE.txt for details.
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 351
diff changeset
7 */
43
5910bf9016cd Add Downloadertest
Andre Heinecke <aheinecke@intevation.de>
parents: 42
diff changeset
8 #ifndef CERTLISTPARSERTEST_H
5910bf9016cd Add Downloadertest
Andre Heinecke <aheinecke@intevation.de>
parents: 42
diff changeset
9 #define CERTLISTPARSERTEST_H
7
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
10
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
11 #include <QObject>
141
f5fa39347366 Fixed QTest includes.
Raimund Renkert <rrenkert@intevation.de>
parents: 43
diff changeset
12 #include <QtTest>
7
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
13
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
14 class CertificateList;
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
15
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
16 class CertListTest: public QObject
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
17 {
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
18 Q_OBJECT
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
19
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
20 CertificateList* testWithFile(const char *filename);
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
21
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
22 private Q_SLOTS:
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
23 void testInvalidSig();
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
24 void testValidList();
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
25 void testInvalidFileNames();
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
26 void testGarbage();
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
27 void testTooLarge();
42
6e7ef7e95031 Some more tests and some more test data
Andre Heinecke <aheinecke@intevation.de>
parents: 26
diff changeset
28 void testEmptyFile();
351
ee59ab0eb7ff Add test for Certificate::fromFile
Andre Heinecke <andre.heinecke@intevation.de>
parents: 240
diff changeset
29 void testCertificateFromFile();
7
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
30 void benchmarkValid();
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
31 };
992c0ec57660 Add unit tests make CertificateList work.
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
32 #endif

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