Mercurial > trustbridge
annotate ui/tests/nsstest.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 | 2fd69803d219 |
children | 17e1c8f37d72 |
rev | line source |
---|---|
304
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
1 #ifndef NSSTEST_H |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
2 #define NSSTEST_H |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
3 |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
4 #include <QTemporaryFile> |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
5 #include <QTemporaryDir> |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
6 #include <QObject> |
307
2fd69803d219
Complete InstRemove NSS test
Andre Heinecke <andre.heinecke@intevation.de>
parents:
304
diff
changeset
|
7 #include <QList> |
2fd69803d219
Complete InstRemove NSS test
Andre Heinecke <andre.heinecke@intevation.de>
parents:
304
diff
changeset
|
8 #include <QByteArray> |
304
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
9 |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
10 #include "certificatelist.h" |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
11 |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
12 class NSSTest: public QObject |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
13 { |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
14 Q_OBJECT |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
15 |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
16 QTemporaryDir fakeHome; |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
17 QDir fakeFirefoxDir; |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
18 QDir fakeThunderbirdDir; |
307
2fd69803d219
Complete InstRemove NSS test
Andre Heinecke <andre.heinecke@intevation.de>
parents:
304
diff
changeset
|
19 QTemporaryDir ffNSSDir; |
2fd69803d219
Complete InstRemove NSS test
Andre Heinecke <andre.heinecke@intevation.de>
parents:
304
diff
changeset
|
20 QTemporaryDir tbNSSDir; |
304
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
21 CertificateList validList; |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
22 QTemporaryFile validListFile; |
307
2fd69803d219
Complete InstRemove NSS test
Andre Heinecke <andre.heinecke@intevation.de>
parents:
304
diff
changeset
|
23 private: |
2fd69803d219
Complete InstRemove NSS test
Andre Heinecke <andre.heinecke@intevation.de>
parents:
304
diff
changeset
|
24 QList<QByteArray> get_nss_certs(QTemporaryDir *nssDir); |
2fd69803d219
Complete InstRemove NSS test
Andre Heinecke <andre.heinecke@intevation.de>
parents:
304
diff
changeset
|
25 void setupTestDir(QTemporaryDir *nssDir); |
304
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
26 |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
27 private Q_SLOTS: |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
28 void initTestCase(); |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
29 void testInstRemove(); |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
30 }; |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
31 |
eecc06f714fd
Add first nsstest.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff
changeset
|
32 #endif // NSSTEST_H |