Mercurial > trustbridge
annotate ui/tests/windowsstoretest.cpp @ 234:a7317252a27c
Add more realistic test data
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 28 Mar 2014 11:34:48 +0000 |
parents | 53ea9b975d1c |
children | 6a7eb102716d |
rev | line source |
---|---|
220
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
1 #include "windowsstoretest.h" |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
2 #include "certificatelist.h" |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
3 #include "strhelp.h" |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
4 #include "certificate.h" |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
5 #include "../cinst/windowsstore.h" |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
6 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
7 #include <QTest> |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
8 |
222
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
9 void WindowsStoreTest::dumpContents() { |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
10 char pszNameString[256]; |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
11 PCCERT_CONTEXT pCert = NULL; |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
12 qDebug() << "Currently in store: " ; |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
13 while((pCert = CertEnumCertificatesInStore(testStore, pCert))) { |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
14 if(CertGetNameString(pCert, |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
15 CERT_NAME_SIMPLE_DISPLAY_TYPE, |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
16 0, |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
17 NULL, |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
18 pszNameString, |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
19 128)){ |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
20 qDebug() << " " << pszNameString ; |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
21 } |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
22 } |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
23 } |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
24 |
220
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
25 void WindowsStoreTest::initTestCase() { |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
26 testStore = CertOpenStore( |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
27 CERT_STORE_PROV_MEMORY, // A memory store |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
28 0, // Encoding type |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
29 // Not used with a memory store |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
30 0, // Use the default provider |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
31 0, // No flags |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
32 NULL); // Not needed |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
33 QVERIFY (testStore); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
34 QFile res(":/list-valid-signed.txt"); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
35 res.open(QIODevice::ReadOnly); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
36 tmpFile.open(); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
37 tmpFile.write(res.readAll()); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
38 tmpFile.close(); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
39 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
40 validList = CertificateList(tmpFile.fileName().toLocal8Bit().data()); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
41 } |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
42 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
43 void WindowsStoreTest::testInstRemove() { |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
44 char ** to_install = NULL, |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
45 ** to_remove = NULL; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
46 PCCERT_CONTEXT pCert = NULL; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
47 size_t i = 0; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
48 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
49 foreach (const Certificate &cert, validList.getInstallCertificates()) { |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
50 strv_append (&to_install, cert.base64Line().toLatin1().constData() + 2, |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
51 cert.base64Line().size() - 2); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
52 } |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
53 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
54 /* Just a quick check for str_append_str functionality */ |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
55 QVERIFY((size_t) validList.getInstallCertificates().size() == strv_length(to_install)); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
56 for (i = 0; i < strv_length(to_install); i++) { |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
57 QVERIFY (validList.getInstallCertificates()[i].base64Line().right( |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
58 validList.getInstallCertificates()[i].base64Line().size() - 2) == |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
59 QString::fromLatin1(to_install[i])); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
60 } |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
61 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
62 do_install(testStore, to_install); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
63 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
64 i = 0; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
65 while((pCert = CertEnumCertificatesInStore(testStore, pCert))) { |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
66 bool certFound = false; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
67 QByteArray data = QByteArray::fromRawData ((const char *)pCert->pbCertEncoded, |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
68 pCert->cbCertEncoded); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
69 foreach (const Certificate &cert, validList.getInstallCertificates()) { |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
70 QByteArray asn1data = QByteArray::fromBase64( |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
71 cert.base64Line().right(cert.base64Line().size() - 2).toLatin1()); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
72 if (asn1data == data) { |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
73 certFound = true; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
74 } |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
75 } |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
76 QVERIFY(certFound); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
77 i++; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
78 } |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
79 QVERIFY ((size_t)validList.getInstallCertificates().size() == i); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
80 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
81 /* Remove all except one */ |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
82 for (i = 0; i < strv_length(to_install) - 1; i++) { |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
83 strv_append(&to_remove, to_install[i], qstrlen(to_install[i])); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
84 } |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
85 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
86 do_remove(testStore, to_remove); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
87 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
88 i = 0; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
89 while((pCert = CertEnumCertificatesInStore(testStore, pCert))) { |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
90 i++; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
91 } |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
92 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
93 QVERIFY(i == 1); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
94 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
95 /* Remove that too */ |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
96 strv_free(to_remove); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
97 to_remove = NULL; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
98 strv_append(&to_remove, to_install[strv_length(to_install) - 1], |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
99 qstrlen(to_install[strv_length(to_install) - 1])); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
100 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
101 do_remove(testStore, to_remove); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
102 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
103 QVERIFY (CertEnumCertificatesInStore(testStore, pCert) == NULL); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
104 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
105 /* Install them all again */ |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
106 do_install(testStore, to_install); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
107 strv_free(to_remove); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
108 to_remove = NULL; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
109 strv_append(&to_remove, to_install[strv_length(to_install) - 1], |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
110 qstrlen(to_install[strv_length(to_install) - 1])); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
111 do_remove(testStore, to_remove); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
112 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
113 i = 0; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
114 while((pCert = CertEnumCertificatesInStore(testStore, pCert))) { |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
115 bool certFound = false; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
116 QByteArray data = QByteArray::fromRawData((const char*) pCert->pbCertEncoded, |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
117 pCert->cbCertEncoded); |
222
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
118 QVERIFY (data.toBase64() != to_remove[0]); |
220
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
119 for (int j = 0; j < validList.getInstallCertificates().size() - 1; j++) { |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
120 const Certificate &cert = validList.getInstallCertificates()[j]; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
121 QByteArray asn1data = QByteArray::fromBase64( |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
122 cert.base64Line().right(cert.base64Line().size() - 2).toLatin1()); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
123 if (asn1data == data) { |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
124 certFound = true; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
125 } |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
126 } |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
127 QVERIFY(certFound); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
128 i++; |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
129 } |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
130 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
131 QVERIFY(i == strv_length(to_install) - 1); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
132 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
133 /* Install all again and remove them afterwards */ |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
134 do_install(testStore, to_install); |
222
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
135 do_remove(testStore, to_install); |
53ea9b975d1c
Cleanup windowsstore.c
Andre Heinecke <aheinecke@intevation.de>
parents:
220
diff
changeset
|
136 |
220
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
137 QVERIFY (CertEnumCertificatesInStore(testStore, pCert) == NULL); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
138 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
139 strv_free(to_install); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
140 strv_free(to_remove); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
141 } |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
142 |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
143 void WindowsStoreTest::cleanupTestCase() { |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
144 CertCloseStore(testStore, 0); |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
145 } |
e6c5c70a67b0
Add test for windowsstores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
146 QTEST_GUILESS_MAIN (WindowsStoreTest); |