Changeset 175

Show
Ignore:
Timestamp:
03/08/10 10:31:10 (6 months ago)
Author:
korthaus
Message:

removed unnecessary commandline outputs

Files:
6 modified

Legend:

Unmodified
Added
Removed
  • changes/tpmmanager-micro/src/tpmmanager.cpp

    r174 r175  
    6969        myTimer() 
    7070{ 
    71         setupUi(this); 
    72          
    73         myProgramLabel->setText( QString::fromAscii("TPM Manager V") + QString::fromAscii(VERSION) ); 
     71    setupUi(this); 
     72         
     73    myProgramLabel->setText( QString::fromAscii("TPM Manager V") + QString::fromAscii(VERSION) ); 
    7474    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( close() ) ); 
     75 
     76    // connect our custom slots manually 
     77    connect ( downloadLink, SIGNAL( linkActivated(const QString&) ), this, SLOT( slotProcessURL(const QString&) ) ); 
     78    connect ( perseusLink, SIGNAL( linkActivated(const QString&) ), this, SLOT( slotProcessURL(const QString&) ) ); 
     79    // we can connect all on_(QWidgetName)_(SIGNAL)(Arguments) slots automagically with one function call (req. Qt 4.4) 
     80    QMetaObject::connectSlotsByName( parent ); 
    7581    
    76    // connect our custom slots manually 
    77    connect ( downloadLink, SIGNAL( linkActivated(const QString&) ), this, SLOT( slotProcessURL(const QString&) ) ); 
    78    connect ( perseusLink, SIGNAL( linkActivated(const QString&) ), this, SLOT( slotProcessURL(const QString&) ) ); 
    79    // we can connect all on_(QWidgetName)_(SIGNAL)(Arguments) slots automagically with one function call (req. Qt 4.4) 
    80    QMetaObject::connectSlotsByName( parent ); 
    81     
    82   struct stat Status; 
    83   /*return 0 if the file is found. 
    84    *return -1 if the file is not found. 
    85    */ 
    86    int tpmdriver = stat( "/dev/tpm", &Status); 
    87    int tpm0driver = stat( "/dev/tpm0", &Status); 
    88    if (tpmdriver == 0 || tpm0driver == 0) 
    89       driverFound->setPixmap( myOkImage ); 
    90    else 
    91       driverFound->setPixmap( myNokImage ); 
    92  
    93         try { 
    94  
    95         tssFound->setPixmap( myOkImage ); 
    96                  
    97                 if ( TPMInstance.isDisabled() && !TPMInstance.isOwned() ) 
    98                   QMessageBox::information( this, "TPM Not Functional", "The TPM is disabled and no owner is set. You have to enable the TPM in the BIOS to use the functions of the TPM, e.g., to take ownership.\n" ); 
    99         }  
    100         catch ( tddl::TDDL_TPM_NotFound &e ) { 
    101                 QMessageBox::critical( this, "Error while trying to communicate with TPM", QString::fromStdString( e.what() ) ); 
    102                 cout << e.what() << endl; 
    103                 driverFound->setPixmap( myNokImage ); 
    104                 tssFound->setPixmap( myUnknownImage ); 
    105         } catch ( tcs::TPM_Error &e ) { 
    106                         cout << "Unknown error: " << e.what() << endl; 
    107         } 
    108          
    109         // Init status & first view 
    110         initStatusGroup(); 
    111         initStatus(); 
    112         // let the PCRs update every second.. 
    113         connect( &myTimer, SIGNAL( timeout() ), this, SLOT( slotUpdatePCRs() ) ); 
    114         myTimer.start( 1000 ); 
     82    struct stat Status; 
     83    /*return 0 if the file is found. 
     84     *return -1 if the file is not found. 
     85     */ 
     86    int tpmdriver = stat( "/dev/tpm", &Status); 
     87    int tpm0driver = stat( "/dev/tpm0", &Status); 
     88    if (tpmdriver == 0 || tpm0driver == 0) 
     89        driverFound->setPixmap( myOkImage ); 
     90    else 
     91        driverFound->setPixmap( myNokImage ); 
     92 
     93    try { 
     94 
     95        tssFound->setPixmap( myOkImage ); 
     96        if ( TPMInstance.isDisabled() && !TPMInstance.isOwned() ) 
     97            QMessageBox::information( this, "TPM Not Functional", "The TPM is disabled and no owner is set. You have to enable the TPM in the BIOS to use the functions of the TPM, e.g., to take ownership.\n" ); 
     98 
     99    } catch ( tddl::TDDL_TPM_NotFound &e ) { 
     100        QMessageBox::critical( this, "No TPM Driver Found", "A TPM device driver could not be found.\nTPM Manager will quit." ); 
     101        driverFound->setPixmap( myNokImage ); 
     102        tssFound->setPixmap( myUnknownImage ); 
     103        exit(1); 
     104    } catch ( tcs::TPM_Error &e ) { 
     105        QMessageBox::critical( this, "Miscellaneous TPM Error", QString::fromStdString( string("An unknown TPM Error occured: ").append( e.what() ) ) ); 
     106    } 
     107         
     108    // Init status & first view 
     109    initStatusGroup(); 
     110    initStatus(); 
     111    // let the PCRs update every second.. 
     112    connect( &myTimer, SIGNAL( timeout() ), this, SLOT( slotUpdatePCRs() ) ); 
     113    myTimer.start( 1000 ); 
    115114} 
    116115 
     
    490489                TPMInstance.takeOwnership(); 
    491490         
    492                 QMessageBox::information( this, "Taking Ownership" , "TPM owner successfully created."  ); 
    493          
    494         } catch ( tcs::TPM_DEACTIVATED_Error &e ) 
    495         { 
    496                 QMessageBox::critical( this, "Error: Taking Ownership" , "Sorry. Could not Take Ownership in deactivated mode due to TSS bug. " ); 
     491                QMessageBox::information( this, "Taking Ownership" , "TPM Owner successfully created."  ); 
     492         
     493        } catch ( tcs::TPM_DEACTIVATED_Error &e ) { 
     494                QMessageBox::critical( this, "Taking Ownership Failed" , "Sorry. Could not Take Ownership in deactivated mode due to TSS bug. " ); 
    497495        } catch ( TPM_DEFEND_LOCK_RUNNING_Error &e ) { 
    498496                std::string msg = "Take Ownership failed (" + string( e.what() ) + ")"; 
    499                 QMessageBox::critical( this, "Error: Taking Ownership", QString::fromStdString( msg ) ); 
     497                QMessageBox::critical( this, "Taking Ownership Failed", QString::fromStdString( msg ) ); 
    500498        } catch ( tcs::TPM_RETRY_Error &e ) { 
    501499                std::string msg = "Take Ownership failed (" + string( e.what() ) + ")"; 
    502                 QMessageBox::critical( this, "Error: Taking Ownership", QString::fromStdString( msg ) ); 
     500                QMessageBox::critical( this, "Taking Ownership Failed", QString::fromStdString( msg ) ); 
    503501        } 
    504502         
  • changes/tpmmanager-micro/ui/tpmmanagerbase.ui

    r161 r175  
    29272927                 </property> 
    29282928                 <property name="text"> 
    2929                   <string>(c) 2007 - 2009 by 
     2929                  <string>(c) 2007 - 2010 by 
    29302930Christian StÃŒble (stueble@sirrix.com)  
    29312931Anoosheh Zaerin (a.zaerin@sirrix.com)  
  • trunk/INSTALL

    r169 r175  
    22================== 
    33 
    4    This package is built using Qt's qmake. qmake automatically generates a makefile from the Qt project file. 
     4This package is built using Qt's qmake. qmake automatically generates a makefile from the Qt project file. 
    55    
    661. Requirements 
     
    88Since 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. 
    99 
    10 The required programs to install the TPM Manager are:  
     10Requirements to build the TPM Manager:  
    1111• Qt4 (>= 4.4) 
    1212• TrouSerS  
    13 The required packages for (k)ubuntu in detail are:  
     13The required packages for (k)Ubuntu in detail are:  
    1414• build-essential  
    1515• libtspi-dev  
     
    2727your version of Qt prior to compiling TPM Manager as described below. 
    2828 
     29# qmake -v 
     30# QMake version 2.01a 
     31# Using Qt version 4.5.2 in /usr/lib 
    2932 
    30 # tar −xzf tpmmanager−0.8.tar.gz  
    31 # cd tpmmanager−0.8  
    32 # qmake −−version  
    33 # qmake // if qmake −−version returns Qt version 3.x.x, use qmake−qt4 instead  
     33If qmake points to a 3.X version of Qt, use qmake-qt4 instead of qmake. 
     34 
     35# tar −xzf tpmmanager−0.8.1.tar.gz  
     36# cd tpmmanager−0.8.1 
     37# qmake 
    3438# make  
    35 # install bin/tpmmanager /path/to/install/directory // e.g., install bin/tpmmanager /usr/local/bin 
     39# install bin/tpmmanager /path/to/install/directory // e.g., "install bin/tpmmanager /usr/local/bin" 
    3640 
    37413. Usage 
    3842======== 
    39 make will create the TPM Manager binary in the bin/ subdirectory. You can run make install to install TPM Manager in default binary path of your system. To start TPM Manager, type tpmmanager on terminal or simply double-click the application icon in your file manager. 
     43Make will create the TPM Manager binary in the bin/ subdirectory. You can run make install to install TPM Manager in default binary path of your system. To start TPM Manager, type tpmmanager on terminal or simply double-click the application icon in your file manager. 
     44You may also add TPM Manager to your Application starter menu, e.g., in Gnome or KDE. 
  • trunk/README

    r53 r175  
    1 For questions, bug reports, and comments, visit http://forum.emscb.org 
     1For instructions to build and run TPM Manager, see the INSTALL readme file included with this package. 
     2For general questions, bug reports, and comments, visit http://sourceforge.net/projects/tpmmanager or http://projects.sirrix.com/tpmmanager. 
  • trunk/src/tpmmanager.cpp

    r173 r175  
    7373        myTimer() 
    7474{ 
    75         setupUi(this); 
    76          
    77         myProgramLabel->setText( QString::fromAscii("TPM Manager V") + QString::fromAscii(VERSION) ); 
     75    setupUi(this); 
     76         
     77    myProgramLabel->setText( QString::fromAscii("TPM Manager V") + QString::fromAscii(VERSION) ); 
    7878    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( close() ) ); 
    7979    
    80    // connect our custom slots manually 
    81    connect ( downloadLink, SIGNAL( linkActivated(const QString&) ), this, SLOT( slotProcessURL(const QString& ) ) ); 
    82    connect ( perseusLink, SIGNAL( linkActivated(const QString&) ), this, SLOT( slotProcessURL(const QString& ) ) ); 
    83    // we can connect all on_(QWidgetName)_(SIGNAL)(Arguments) slots automagically with one function call (req. Qt 4.4) 
    84    QMetaObject::connectSlotsByName( parent ); 
     80    // connect our custom slots manually 
     81    connect ( downloadLink, SIGNAL( linkActivated(const QString&) ), this, SLOT( slotProcessURL(const QString& ) ) ); 
     82    connect ( perseusLink, SIGNAL( linkActivated(const QString&) ), this, SLOT( slotProcessURL(const QString& ) ) ); 
     83    // we can connect all on_(QWidgetName)_(SIGNAL)(Arguments) slots automagically with one function call (req. Qt 4.4) 
     84    QMetaObject::connectSlotsByName( parent ); 
    8585    
    86   struct stat Status; 
    87   /*return 0 if the file is found. 
    88    *return -1 if the file is not found. 
    89    */ 
    90    int tpmdriver = stat( "/dev/tpm", &Status); 
    91    int tpm0driver = stat( "/dev/tpm0", &Status); 
    92    if (tpmdriver == 0 || tpm0driver == 0) 
    93       driverFound->setPixmap( myOkImage ); 
    94    else 
    95       driverFound->setPixmap( myNokImage ); 
    96  
    97         try { 
    98       myTSS = new TSS; 
    99                 myTPM = new TPM( myTSS->getContextHandle() ); 
    100  
    101       tssFound->setPixmap( myOkImage ); 
    102  
    103                 if ( myTPM->isDisabled() && !myTPM->hasOwner() ) 
    104                   QMessageBox::information( this, "TPM Not Functional", "The TPM is disabled and no owner is set. You have to enable the TPM in the BIOS to use the functions of the TPM, e.g., to take ownership.\n" ); 
    105         }  
    106         catch ( TPMDriverNotFound &e ) { 
    107                 cout << e.what() << endl; 
    108                 driverFound->setPixmap( myNokImage ); 
    109                 tssFound->setPixmap( myUnknownImage ); 
    110         } 
    111         catch ( TSSSystemNotFound &e ) { 
    112                 cout << e.what() << endl; 
    113                 QMessageBox::information( this, "Error: No TSS found", "A TCG Software Stack (TSS) could not be found. When using TrouSerS, make sure the TrouSerS daemon (tcsd) is running.\nMost functionality will be disabled." ); 
    114                 listBox->setEnabled(false); 
    115         } 
    116          
    117         // Init status & first view 
    118         initStatusGroup(); 
    119         initStatus(); 
    120         // let the PCRs update every second.. 
    121         connect( &myTimer, SIGNAL( timeout() ), this, SLOT( slotUpdatePCRs() ) ); 
    122         myTimer.start( 1000 ); 
     86    struct stat Status; 
     87    /*return 0 if the file is found. 
     88     *return -1 if the file is not found. 
     89     */ 
     90    int tpmdriver = stat( "/dev/tpm", &Status); 
     91    int tpm0driver = stat( "/dev/tpm0", &Status); 
     92    if (tpmdriver == 0 || tpm0driver == 0) 
     93        driverFound->setPixmap( myOkImage ); 
     94    else 
     95        driverFound->setPixmap( myNokImage ); 
     96 
     97    try { 
     98        myTSS = new TSS; 
     99        myTPM = new TPM( myTSS->getContextHandle() ); 
     100 
     101        tssFound->setPixmap( myOkImage ); 
     102 
     103        if ( myTPM->isDisabled() && !myTPM->hasOwner() ) { 
     104            QMessageBox::critical( this, "TPM Not Functional", "The TPM is disabled and no TPM Owner is set. You have to enable the TPM in the BIOS to use the functions of the TPM, e.g., to take ownership.\n" ); 
     105        } 
     106 
     107    } catch ( TPMDriverNotFound &e ) { 
     108        QMessageBox::critical( this, "No TPM Driver Found", "A TPM device driver could not be found.\nTPM Manager will quit." ); 
     109        driverFound->setPixmap( myNokImage ); 
     110        tssFound->setPixmap( myUnknownImage ); 
     111        exit(1); 
     112    } catch ( TSSSystemNotFound &e ) { 
     113        QMessageBox::critical( this, "No TSS Found", "A TCG Software Stack (TSS) could not be found. When using TrouSerS, make sure the TrouSerS daemon (tcsd) is running.\nTPM Manager will quit." ); 
     114        exit(1); 
     115    } 
     116         
     117    // Init status & first view 
     118    initStatusGroup(); 
     119    initStatus(); 
     120    // let the PCRs update every second.. 
     121    connect( &myTimer, SIGNAL( timeout() ), this, SLOT( slotUpdatePCRs() ) ); 
     122    myTimer.start( 1000 ); 
    123123} 
    124124 
     
    466466                QMessageBox::information( this, "Taking Ownership" , "TPM owner successfully created."  ); 
    467467         
    468         } catch ( IsDeactivatedError &e ) 
    469         { 
    470                 QMessageBox::critical( this, "Error: Taking Ownership" , "Sorry. Could not Take Ownership in deactivated mode due to TSS bug. " ); 
    471         } catch ( UnknownError &e ) 
    472         { 
     468        } catch ( IsDeactivatedError &e ) { 
     469            QMessageBox::critical( this, "Error: Taking Ownership" , "Sorry. Could not Take Ownership in deactivated mode due to TSS bug. " ); 
     470        } catch ( UnknownError &e ) { 
    473471            QMessageBox::critical( this, "Error: Taking Ownership" , QString( "Could not Take Ownership for the following reason: " ).append( QString::fromStdString( e.what() ) ) ); 
    474472        } 
     
    787785        } 
    788786        // refresh TPM status view & options 
    789         cout << "TPM_Manager::onMyDisable_clicked(): Refreshing status views." << endl; 
    790787        initStatusGroup(); 
    791788        initStatus(); 
  • trunk/ui/tpmmanagerbase.ui

    r156 r175  
    28922892                 </property> 
    28932893                 <property name="text"> 
    2894                   <string>(c) 2007 - 2009 by 
     2894                  <string>(c) 2007 - 2010 by 
    28952895Christian StÃŒble (stueble@sirrix.com)  
    28962896Anoosheh Zaerin (a.zaerin@sirrix.com)