Mercurial > trustbridge
annotate ui/tests/cinstprocesstest.h @ 359:f6ce186cebc2
If DO_RELEASE_BUILD is set use pubkey-release and test with it
This currently fails because polarssl rejects keys with
a public exponent larger then 64 bit.
With the following patch all tests pass. But this
currently awaits upstream comment.
https://polarssl.org/discussions/bug-report-issues/rsa-keys-with-large-public-exponents-are-rejected
--- rsa.c.orig 2014-04-10 17:22:32.727290031 +0200
+++ rsa.c 2014-04-10 17:22:38.847410225 +0200
@@ -154,7 +154,7 @@
return( POLARSSL_ERR_RSA_KEY_CHECK_FAILED );
if( mpi_msb( &ctx->E ) < 2 ||
- mpi_msb( &ctx->E ) > 64 )
+ mpi_msb( &ctx->E ) > POLARSSL_MPI_MAX_BITS )
return( POLARSSL_ERR_RSA_KEY_CHECK_FAILED );
return( 0 );
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 10 Apr 2014 17:50:44 +0200 |
parents | 9c5e6b142611 |
children | 17e1c8f37d72 |
rev | line source |
---|---|
100
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
1 #ifndef CINSTPROCESSTEST_H |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
2 #define CINSTPROCESSTEST_H |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
3 |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
4 /* @file Tests for the cinst process |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
5 * @brief Tests for the cinst process as well as the UI side |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
6 */ |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
7 |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
8 #include <QObject> |
294
d95fd88f6616
Prepare cinstprocesstest to be executed on Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
151
diff
changeset
|
9 #include <QStringList> |
100
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
10 #include <QProcess> |
294
d95fd88f6616
Prepare cinstprocesstest to be executed on Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
151
diff
changeset
|
11 #include <QTemporaryFile> |
306
9c5e6b142611
Set the home directory to a temporary location to avoid writing into real nss stores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
294
diff
changeset
|
12 #include <QTemporaryDir> |
141
f5fa39347366
Fixed QTest includes.
Raimund Renkert <rrenkert@intevation.de>
parents:
100
diff
changeset
|
13 #include <QTest> |
100
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
14 #include "certificatelist.h" |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
15 |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
16 class CinstProcessTest: public QObject |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
17 { |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
18 Q_OBJECT |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
19 |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
20 private: |
294
d95fd88f6616
Prepare cinstprocesstest to be executed on Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
151
diff
changeset
|
21 QProcess* startCinstProcess(const QStringList& args = QStringList()); |
d95fd88f6616
Prepare cinstprocesstest to be executed on Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
151
diff
changeset
|
22 QTemporaryFile validListFile; |
d95fd88f6616
Prepare cinstprocesstest to be executed on Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
151
diff
changeset
|
23 QTemporaryFile otherListFile; |
d95fd88f6616
Prepare cinstprocesstest to be executed on Windows
Andre Heinecke <aheinecke@intevation.de>
parents:
151
diff
changeset
|
24 QTemporaryFile invalidListFile; |
306
9c5e6b142611
Set the home directory to a temporary location to avoid writing into real nss stores
Andre Heinecke <andre.heinecke@intevation.de>
parents:
294
diff
changeset
|
25 QTemporaryDir fakeHome; |
100
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
26 CertificateList validList; |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
27 CertificateList otherList; |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
28 CertificateList invalidList; |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
29 |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
30 private Q_SLOTS: |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
31 void initTestCase(); |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
32 void testValidInput(); |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
33 void testInvalidInstruction(); |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
34 void testNoInput(); |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
35 void testNoList(); |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
36 void testGarbageInput(); |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
37 void testNoInstructions(); |
151
0df62decff90
Test if uninstall is handled as instruction
Andre Heinecke <aheinecke@intevation.de>
parents:
141
diff
changeset
|
38 void testUninstall(); |
100
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
39 }; |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
40 #endif |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
41 |
8fa273791242
Add test for cinstprocess
Andre Heinecke <aheinecke@intevation.de>
parents:
diff
changeset
|
42 |