comparison ui/tests/certlistparsertest.cpp @ 31:37fc66967517

Implement signature verification wiht polarssl
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 13 Mar 2014 18:12:16 +0000
parents cbd57d767dfa
children 6e7ef7e95031
comparison
equal deleted inserted replaced
30:381558ff6f26 31:37fc66967517
1 #include "certlistparsertest.h" 1 #include "certlistparsertest.h"
2 #include "certificatelist.h" 2 #include "certificatelist.h"
3 3
4 #include <QDebug> 4 #include <QDebug>
5 5
6 void CertListTest::testValidList()
7 {
8 const char *fname = "list-valid-signed.txt";
9 CertificateList *certList = testWithFile(fname);
10 printf("Status :%i\n ",certList->getStatus());
11 QCOMPARE (certList->getStatus(), Valid);
12 QVERIFY (certList->isValid());
13 delete certList;
14 }
6 15
7 void CertListTest::testInvalidSig() 16 void CertListTest::testInvalidSig()
8 { 17 {
9 const char *fname = "list-invalid-signed.txt"; 18 const char *fname = "list-invalid-signed.txt";
10 CertificateList *certList = testWithFile(fname); 19 CertificateList *certList = testWithFile(fname);
42 QCOMPARE (certList->getStatus(), TooLarge); 51 QCOMPARE (certList->getStatus(), TooLarge);
43 QVERIFY (!certList->isValid()); 52 QVERIFY (!certList->isValid());
44 delete certList; 53 delete certList;
45 } 54 }
46 55
47 void CertListTest::testValidList()
48 {
49 const char *fname = "list-valid-signed.txt";
50 CertificateList *certList = testWithFile(fname);
51 QCOMPARE (certList->getStatus(), Valid);
52 QVERIFY (certList->isValid());
53 delete certList;
54 }
55
56 void CertListTest::benchmarkValid() 56 void CertListTest::benchmarkValid()
57 { 57 {
58 const char *fname = "list-valid-signed.txt"; 58 const char *fname = "list-valid-signed.txt";
59 59
60 QBENCHMARK_ONCE { 60 QBENCHMARK_ONCE {

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