Skip to content

Commit

Permalink
Merge pull request #7 from Rohde-Schwarz/cleanup-2022
Browse files Browse the repository at this point in the history
Clean up after Qt5 port
  • Loading branch information
securitykernel authored Jan 22, 2023
2 parents 5a75509 + 0c7ac8f commit 4311c03
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 51 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
v0.9.0

* Update to Qt5
* Fix some compiler warnings
* Update copyright in About dialog
* Fix links in About dialog

v0.8.1

* Handle empty selection in SRK password dialog correctly
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ The TPM Manager targets Linux, but later releases should be usable with all oper

## Requirements

Since the TPM Manager is based entirely on the Qt UI framework, corresponding header and library files Qt4 should be in the library path.
On some linux distributions you have to install the developer version of Qt to have the header files used by TPM Manager.
Since the TPM Manager is based entirely on the Qt UI framework, corresponding Qt header and library files should be in the library path.
On some Linux distributions you have to install the developer version of Qt to have the header files used by TPM Manager.

Requirements to build the TPM Manager:

Expand All @@ -43,23 +43,22 @@ Requirements to build the TPM Manager:
Install the following packages on a Debian-based Linux, e.g., Ubuntu Linux:

```bash
sudo apt-get install build-essential libtspi-dev libqt4-dev
sudo apt-get install build-essential libtspi-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
```
For a Fedora based Linux install the following packages:

```bash
sudo yum install make automake gcc gcc-c++ qt-devel trousers-devel
sudo dnf install make automake gcc gcc-c++ qt5-qtbase-devel trousers-devel
```

To use the features of the TPM Manager you need a running TrouSerS daemon.
The TPM Manager has been successfully compiled under Qt version 4.8.1.

## Building

This package is built using Qt's qmake. qmake automatically generates a makefile from the Qt project file.

```bash
qmake-qt5
qmake-qt5 (or simply: qmake)
make
```

Expand Down
2 changes: 1 addition & 1 deletion src/NewPasswordDialog.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public:
* @return New NewPasswordDialog instance
*
*/
NewPasswordDialog( QWidget * parent = 0, Qt::WindowFlags f = 0 );
NewPasswordDialog( QWidget * parent = 0, Qt::WindowFlags f = QFlag( 0 ) );

/**
* @brief Default destructor
Expand Down
2 changes: 1 addition & 1 deletion src/PasswordDialog.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public:
* @return New PasswordDialog instance
*
*/
PasswordDialog( QWidget * parent = 0, Qt::WindowFlags f = 0 );
PasswordDialog( QWidget * parent = 0, Qt::WindowFlags f = QFlag( 0 ) );

/**
* @brief Default destructor
Expand Down
2 changes: 1 addition & 1 deletion src/PublicKeyView.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void PublicKeyView::setPublicKey( PublicKey &pk )
string algo = pk.getAlgorithm();

myAlgorithm->setText( QString::fromStdString( algo ) );
myKeySize->setText( QString::fromStdString( pk.getKeySize( algo ) ) );
myKeySize->setText( QString::fromStdString( pk.getKeySize() ) );
myEncScheme->setText( QString::fromStdString( pk.getEncryptionScheme() ) );
mySigScheme->setText( QString::fromStdString( pk.getSignatureScheme() ) );
}
Expand Down
2 changes: 1 addition & 1 deletion src/PublicKeyView.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public:
* @return New PublicKeyView instance
*
*/
PublicKeyView( QWidget * parent = 0, Qt::WindowFlags f = 0);
PublicKeyView( QWidget * parent = 0, Qt::WindowFlags f = QFlag( 0 ) );

/**
* @brief Default destructor
Expand Down
2 changes: 1 addition & 1 deletion src/SetSRKView.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public:
* @return New SetSRKView instance
*
*/
SetSRKView( QWidget * parent = 0, Qt::WindowFlags f = 0 );
SetSRKView( QWidget * parent = 0, Qt::WindowFlags f = QFlag( 0 ) );

/**
* @brief Default destructor
Expand Down
3 changes: 1 addition & 2 deletions src/TPMManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

#include "TPMManager.hxx"

#define VERSION "0.8.1"
#define VERSION "0.9.0"
//
using namespace std;
using namespace microtss;
Expand All @@ -79,7 +79,6 @@ TPM_Manager::TPM_Manager( QWidget * parent, Qt::WindowFlags f)

// connect our custom slots manually
connect ( downloadLink, SIGNAL( linkActivated(const QString&) ), this, SLOT( slotProcessURL(const QString& ) ) );
connect ( perseusLink, SIGNAL( linkActivated(const QString&) ), this, SLOT( slotProcessURL(const QString& ) ) );
// we can connect all on_(QWidgetName)_(SIGNAL)(Arguments) slots automagically with one function call (req. Qt 4.4)
QMetaObject::connectSlotsByName( parent );

Expand Down
2 changes: 1 addition & 1 deletion src/TPMManager.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public:
* @return New TPM_Manager instance
*
*/
TPM_Manager( QWidget * parent = 0, Qt::WindowFlags f = 0 );
TPM_Manager( QWidget * parent = 0, Qt::WindowFlags f = QFlag( 0 ) );

/**
* @brief Default destructor
Expand Down
2 changes: 1 addition & 1 deletion src/microtss/PublicKey.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ const string PublicKey::getSignatureScheme()
return sigscheme;
}

const string PublicKey::getKeySize( string algorithm )
const string PublicKey::getKeySize()
{
TSS_RESULT result;
UINT32 attributeSize;
Expand Down
4 changes: 2 additions & 2 deletions src/microtss/PublicKey.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public:
* @param endorsementKeyHandle Handle of the Endorsement Key
*
*/
PublicKey( const TSS_HKEY &endorsementKeyHandle );
PublicKey( const TSS_HKEY &endorsementKeyHandle );

/**
* @brief Default destructor
Expand Down Expand Up @@ -109,7 +109,7 @@ public:
* @return key size of public key (in bits)
*
*/
const std::string getKeySize( std::string algorithm );
const std::string getKeySize();


protected:
Expand Down
37 changes: 3 additions & 34 deletions ui/TPMManagerBase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -2612,10 +2612,8 @@ p, li { white-space: pre-wrap; }
</font>
</property>
<property name="text">
<string>(c) 2007 - 2011 by
Christian Stüble ([email protected])
Anoosheh Zaerin ([email protected])
René Korthaus ([email protected])
<string>(c) 2007 - 2011 Sirrix AG
(c) 2022 Rohde &amp; Schwarz
For more information, see </string>
</property>
<property name="alignment">
Expand All @@ -2629,36 +2627,7 @@ For more information, see </string>
<item>
<widget class="QLabel" name="downloadLink">
<property name="text">
<string>&lt;A HREF=&quot;https://projects.sirrix.com/trac/tpmmanager&quot;&gt;https://projects.sirrix.com/trac/tpmmanager&lt;/a&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="textLabel1_8">
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This application is part of the TURAYA security framework, see&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="perseusLink">
<property name="text">
<string>&lt;a href=&quot;http://www.turaya.org&quot;&gt;http://www.turaya.org&lt;/a&gt;</string>
<string>&lt;A HREF=&quot;https://github.com/Rohde-Schwarz/TPMManager&quot;&gt;https://github.com/Rohde-Schwarz/TPMManager&lt;/a&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand Down

0 comments on commit 4311c03

Please sign in to comment.