Fixed FTBFS when building tdelibs/tdebase without tdehw.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/201/head
Michele Calgaro 3 years ago
parent dcce5a276f
commit 8b79083f96
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -44,7 +44,10 @@
#include <tqlistview.h> #include <tqlistview.h>
#include <tqheader.h> #include <tqheader.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <tqfile.h> #include <tqfile.h>
#include <tdecryptographiccarddevice.h>
#endif
#include <ctype.h> #include <ctype.h>
#include <unistd.h> #include <unistd.h>
@ -99,6 +102,7 @@ PasswordDlg::PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin, TQDat
mPlugin( plugin ), mPlugin( plugin ),
mCapsLocked(-1), mCapsLocked(-1),
mUnlockingFailed(false), mUnlockingFailed(false),
validUserCardInserted(false),
showInfoMessages(true), showInfoMessages(true),
mCardLoginInProgress(false) mCardLoginInProgress(false)
{ {
@ -477,6 +481,7 @@ void PasswordDlg::reapVerify()
switch (WEXITSTATUS(status)) { switch (WEXITSTATUS(status)) {
case AuthOk: case AuthOk:
{ {
#ifdef __TDE_HAVE_TDEHWLIB
KUser userinfo; KUser userinfo;
TQString fileName = userinfo.homeDir() + "/.tde_card_login_state"; TQString fileName = userinfo.homeDir() + "/.tde_card_login_state";
TQFile flagFile(fileName); TQFile flagFile(fileName);
@ -491,6 +496,7 @@ void PasswordDlg::reapVerify()
// Card was not used to log in // Card was not used to log in
flagFile.remove(); flagFile.remove();
} }
#endif
// Signal success // Signal success
greet->succeeded(); greet->succeeded();
@ -553,6 +559,7 @@ void PasswordDlg::handleVerify()
setFixedSize( sizeHint().width(), sizeHint().height() + 1 ); setFixedSize( sizeHint().width(), sizeHint().height() + 1 );
setFixedSize( sizeHint() ); setFixedSize( sizeHint() );
#ifdef __TDE_HAVE_TDEHWLIB
// Check if cryptographic card login is being used // Check if cryptographic card login is being used
if (mCardLoginInProgress) { if (mCardLoginInProgress) {
// Attempt authentication if configured // Attempt authentication if configured
@ -566,6 +573,7 @@ void PasswordDlg::handleVerify()
} }
mCardLoginInProgress = false; mCardLoginInProgress = false;
} }
#endif
} }
else { else {
greet->textPrompt( arr, false, false ); greet->textPrompt( arr, false, false );
@ -972,7 +980,12 @@ void PasswordDlg::capsLocked()
} }
void PasswordDlg::attemptCardLogin() { void PasswordDlg::attemptCardLogin() {
#ifdef HAVE_KRB5 #ifdef __TDE_HAVE_TDEHWLIB
#ifndef HAVE_KRB5
// Don't enable card-based logins if Kerberos integration was disabled
return;
#endif
// Make sure card logins are enabled before attempting one // Make sure card logins are enabled before attempting one
KSimpleConfig *systemconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" )); KSimpleConfig *systemconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" ));
systemconfig->setGroup(NULL); systemconfig->setGroup(NULL);
@ -982,10 +995,6 @@ void PasswordDlg::attemptCardLogin() {
{ {
return; return;
} }
#else
// Don't enable card-based logins if Kerberos integration was disabled
return;
#endif
if (mCardLoginInProgress) { if (mCardLoginInProgress) {
return; return;
@ -1007,9 +1016,11 @@ void PasswordDlg::attemptCardLogin() {
greet->start(); greet->start();
greet->setPassword(""); greet->setPassword("");
TQTimer::singleShot(0, this, SLOT(slotOK())); TQTimer::singleShot(0, this, SLOT(slotOK()));
#endif
} }
void PasswordDlg::resetCardLogin() { void PasswordDlg::resetCardLogin() {
#ifdef __TDE_HAVE_TDEHWLIB
validUserCardInserted = false; validUserCardInserted = false;
greet->abort(); greet->abort();
greet->clear(); greet->clear();
@ -1022,9 +1033,10 @@ void PasswordDlg::resetCardLogin() {
setFixedSize(sizeHint()); setFixedSize(sizeHint());
// Restore information message display settings // Restore information message display settings
greet->setInfoMessageDisplay(showInfoMessages); greet->setInfoMessageDisplay(showInfoMessages);
mCardLoginInProgress = false; mCardLoginInProgress = false;
#endif
} }
#include "lockdlg.moc" #include "lockdlg.moc"

@ -17,6 +17,14 @@
//some image will be corrupted). //some image will be corrupted).
#include <config.h> #include <config.h>
#include <tdeglobal.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <ksslcertificate.h>
#include <kuser.h>
#include <tdehardwaredevices.h>
#include <tdecryptographiccarddevice.h>
#endif
#include "lockprocess.h" #include "lockprocess.h"
#include "lockdlg.h" #include "lockdlg.h"
@ -34,7 +42,6 @@
#include <tdeapplication.h> #include <tdeapplication.h>
#include <kservicegroup.h> #include <kservicegroup.h>
#include <kdebug.h> #include <kdebug.h>
#include <kuser.h>
#include <tdemessagebox.h> #include <tdemessagebox.h>
#include <tdeglobalsettings.h> #include <tdeglobalsettings.h>
#include <tdelocale.h> #include <tdelocale.h>
@ -291,6 +298,7 @@ LockProcess::LockProcess()
} }
} }
#ifdef __TDE_HAVE_TDEHWLIB
// Initialize SmartCard readers // Initialize SmartCard readers
TDEGenericDevice *hwdevice; TDEGenericDevice *hwdevice;
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
@ -303,6 +311,7 @@ LockProcess::LockProcess()
cdevice->enableCardMonitoring(true); cdevice->enableCardMonitoring(true);
// cdevice->enablePINEntryCallbacks(true); // cdevice->enablePINEntryCallbacks(true);
} }
#endif
#ifdef KEEP_MOUSE_UNGRABBED #ifdef KEEP_MOUSE_UNGRABBED
setEnabled(false); setEnabled(false);
@ -2823,6 +2832,7 @@ void LockProcess::processInputPipeCommand(TQString inputcommand) {
} }
void LockProcess::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) { void LockProcess::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) {
#ifdef __TDE_HAVE_TDEHWLIB
TQString login_name = TQString::null; TQString login_name = TQString::null;
X509CertificatePtrList certList = cdevice->cardX509Certificates(); X509CertificatePtrList certList = cdevice->cardX509Certificates();
if (certList.count() > 0) { if (certList.count() > 0) {
@ -2856,9 +2866,11 @@ void LockProcess::cryptographicCardInserted(TDECryptographicCardDevice* cdevice)
} }
} }
} }
#endif
} }
void LockProcess::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice) { void LockProcess::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice) {
#ifdef __TDE_HAVE_TDEHWLIB
PasswordDlg* passDlg = dynamic_cast<PasswordDlg*>(currentDialog); PasswordDlg* passDlg = dynamic_cast<PasswordDlg*>(currentDialog);
if (passDlg) { if (passDlg) {
passDlg->resetCardLogin(); passDlg->resetCardLogin();
@ -2867,9 +2879,12 @@ void LockProcess::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice)
m_loginCardDevice = NULL; m_loginCardDevice = NULL;
TQTimer::singleShot(0, this, SLOT(signalPassDlgToAttemptCardAbort())); TQTimer::singleShot(0, this, SLOT(signalPassDlgToAttemptCardAbort()));
} }
#endif
} }
void LockProcess::signalPassDlgToAttemptCardLogin() { void LockProcess::signalPassDlgToAttemptCardLogin()
{
#ifdef __TDE_HAVE_TDEHWLIB
PasswordDlg* passDlg = dynamic_cast<PasswordDlg*>(currentDialog); PasswordDlg* passDlg = dynamic_cast<PasswordDlg*>(currentDialog);
if (passDlg && m_loginCardDevice) { if (passDlg && m_loginCardDevice) {
passDlg->attemptCardLogin(); passDlg->attemptCardLogin();
@ -2880,9 +2895,12 @@ void LockProcess::signalPassDlgToAttemptCardLogin() {
TQTimer::singleShot(0, this, SLOT(signalPassDlgToAttemptCardLogin())); TQTimer::singleShot(0, this, SLOT(signalPassDlgToAttemptCardLogin()));
} }
} }
#endif
} }
void LockProcess::signalPassDlgToAttemptCardAbort() { void LockProcess::signalPassDlgToAttemptCardAbort()
{
#ifdef __TDE_HAVE_TDEHWLIB
PasswordDlg* passDlg = dynamic_cast<PasswordDlg*>(currentDialog); PasswordDlg* passDlg = dynamic_cast<PasswordDlg*>(currentDialog);
if (passDlg) { if (passDlg) {
passDlg->resetCardLogin(); passDlg->resetCardLogin();
@ -2893,9 +2911,12 @@ void LockProcess::signalPassDlgToAttemptCardAbort() {
TQTimer::singleShot(0, this, SLOT(signalPassDlgToAttemptCardAbort())); TQTimer::singleShot(0, this, SLOT(signalPassDlgToAttemptCardAbort()));
} }
} }
#endif
} }
void LockProcess::cryptographicCardPinRequested(TQString prompt, TDECryptographicCardDevice* cdevice) { void LockProcess::cryptographicCardPinRequested(TQString prompt, TDECryptographicCardDevice* cdevice)
{
#ifdef __TDE_HAVE_TDEHWLIB
TQCString password; TQCString password;
TQString pin_entry; TQString pin_entry;
@ -2911,10 +2932,16 @@ void LockProcess::cryptographicCardPinRequested(TQString prompt, TDECryptographi
else { else {
cdevice->setProvidedPin(TQString::null); cdevice->setProvidedPin(TQString::null);
} }
#endif
} }
TDECryptographicCardDevice* LockProcess::cryptographicCardDevice() { TDECryptographicCardDevice* LockProcess::cryptographicCardDevice()
{
#ifdef __TDE_HAVE_TDEHWLIB
return m_loginCardDevice; return m_loginCardDevice;
#else
return NULL;
#endif
} }
void LockProcess::fullyOnline() { void LockProcess::fullyOnline() {

@ -10,13 +10,7 @@
#ifndef __LOCKENG_H__ #ifndef __LOCKENG_H__
#define __LOCKENG_H__ #define __LOCKENG_H__
#include <ksslcertificate.h>
#include <tdehardwaredevices.h>
#include <tdecryptographiccarddevice.h>
#include <kgreeterplugin.h> #include <kgreeterplugin.h>
#include <kprocess.h> #include <kprocess.h>
#include <kpixmap.h> #include <kpixmap.h>
#include <krootpixmap.h> #include <krootpixmap.h>
@ -35,6 +29,11 @@ class KLibrary;
class KWinModule; class KWinModule;
class KSMModalDialog; class KSMModalDialog;
class LockProcess; class LockProcess;
#ifdef __TDE_HAVE_TDEHWLIB
class TDECryptographicCardDevice;
#else
#define TDECryptographicCardDevice void
#endif
struct GreeterPluginHandle { struct GreeterPluginHandle {
KLibrary *library; KLibrary *library;

@ -11,18 +11,20 @@
#include <stdlib.h> #include <stdlib.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <tdeglobal.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <ksslcertificate.h> #include <ksslcertificate.h>
#include <kuser.h>
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#include <tdecryptographiccarddevice.h> #include <tdecryptographiccarddevice.h>
#endif
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#include <kservicegroup.h> #include <kservicegroup.h>
#include <ksimpleconfig.h> #include <ksimpleconfig.h>
#include <kdebug.h> #include <kdebug.h>
#include <kuser.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <tqfile.h> #include <tqfile.h>
#include <tqtimer.h> #include <tqtimer.h>
@ -198,6 +200,7 @@ SaverEngine::SaverEngine()
delete config; delete config;
config = NULL; config = NULL;
#ifdef __TDE_HAVE_TDEHWLIB
// Initialize SmartCard readers // Initialize SmartCard readers
TDEGenericDevice *hwdevice; TDEGenericDevice *hwdevice;
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
@ -221,6 +224,7 @@ SaverEngine::SaverEngine()
} }
flagFile.close(); flagFile.close();
} }
#endif
dBusConnect(); dBusConnect();
} }
@ -261,6 +265,7 @@ void SaverEngine::cardStartupTimeout() {
} }
void SaverEngine::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) { void SaverEngine::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) {
#ifdef __TDE_HAVE_TDEHWLIB
TQString login_name = TQString::null; TQString login_name = TQString::null;
X509CertificatePtrList certList = cdevice->cardX509Certificates(); X509CertificatePtrList certList = cdevice->cardX509Certificates();
if (certList.count() > 0) { if (certList.count() > 0) {
@ -282,9 +287,11 @@ void SaverEngine::cryptographicCardInserted(TDECryptographicCardDevice* cdevice)
mValidCryptoCardInserted = true; mValidCryptoCardInserted = true;
} }
} }
#endif
} }
void SaverEngine::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice) { void SaverEngine::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice) {
#ifdef __TDE_HAVE_TDEHWLIB
if (mValidCryptoCardInserted) { if (mValidCryptoCardInserted) {
mValidCryptoCardInserted = false; mValidCryptoCardInserted = false;
@ -294,6 +301,7 @@ void SaverEngine::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice)
// Force lock // Force lock
lockScreen(); lockScreen();
} }
#endif
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

@ -18,7 +18,11 @@
#include <tqdbusconnection.h> #include <tqdbusconnection.h>
#ifdef __TDE_HAVE_TDEHWLIB
class TDECryptographicCardDevice; class TDECryptographicCardDevice;
#else
#define TDECryptographicCardDevice void
#endif
class DCOPClientTransaction; class DCOPClientTransaction;
class TQT_DBusMessage; class TQT_DBusMessage;
class TQT_DBusProxy; class TQT_DBusProxy;

@ -21,7 +21,7 @@ include( ConfigureChecks.cmake )
add_subdirectory( backend ) add_subdirectory( backend )
add_subdirectory( kfrontend ) add_subdirectory( kfrontend )
add_subdirectory( cryptocardwatcher ) tde_conditional_add_subdirectory( WITH_TDEHWLIB cryptocardwatcher )
# systemd # systemd
if( BUILD_TDM_SYSTEMD_UNIT_FILE AND NOT "${SYSTEMDSYSTEMUNITDIR}" STREQUAL "" ) if( BUILD_TDM_SYSTEMD_UNIT_FILE AND NOT "${SYSTEMDSYSTEMUNITDIR}" STREQUAL "" )

@ -35,10 +35,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <dmctl.h> #include <dmctl.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <ksslcertificate.h> #include <ksslcertificate.h>
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#include <tdecryptographiccarddevice.h> #include <tdecryptographiccarddevice.h>
#endif
#include <tdeapplication.h> #include <tdeapplication.h>
#include <tdelocale.h> #include <tdelocale.h>
@ -246,6 +247,7 @@ KGreeter::~KGreeter()
void KGreeter::cryptographicCardWatcherSetup() { void KGreeter::cryptographicCardWatcherSetup() {
cardLoginUser = TQString::null; cardLoginUser = TQString::null;
#ifdef __TDE_HAVE_TDEHWLIB
// Initialize SmartCard readers // Initialize SmartCard readers
TDEGenericDevice *hwdevice; TDEGenericDevice *hwdevice;
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
@ -256,6 +258,7 @@ void KGreeter::cryptographicCardWatcherSetup() {
connect(cdevice, TQT_SIGNAL(cardRemoved(TDECryptographicCardDevice*)), this, TQT_SLOT(cryptographicCardRemoved(TDECryptographicCardDevice*))); connect(cdevice, TQT_SIGNAL(cardRemoved(TDECryptographicCardDevice*)), this, TQT_SLOT(cryptographicCardRemoved(TDECryptographicCardDevice*)));
cdevice->enableCardMonitoring(true); cdevice->enableCardMonitoring(true);
} }
#endif
} }
void KGreeter::done(int r) { void KGreeter::done(int r) {
@ -858,7 +861,11 @@ KGreeter::verifySetUser( const TQString &user )
} }
void KGreeter::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) { void KGreeter::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) {
#ifdef HAVE_KRB5 #ifdef __TDE_HAVE_TDEHWLIB
#ifndef HAVE_KRB5
// Don't enable card-based logins if Kerberos integration was disabled
return;
#endif
// Make sure card logins are enabled before attempting one // Make sure card logins are enabled before attempting one
KSimpleConfig *systemconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" )); KSimpleConfig *systemconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" ));
systemconfig->setGroup(NULL); systemconfig->setGroup(NULL);
@ -868,10 +875,6 @@ void KGreeter::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) {
{ {
return; return;
} }
#else
// Don't enable card-based logins if Kerberos integration was disabled
return;
#endif
TQString login_name = TQString::null; TQString login_name = TQString::null;
X509CertificatePtrList certList = cdevice->cardX509Certificates(); X509CertificatePtrList certList = cdevice->cardX509Certificates();
@ -938,9 +941,11 @@ void KGreeter::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) {
verify->accept(); verify->accept();
} }
} }
#endif
} }
void KGreeter::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice) { void KGreeter::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice) {
#ifdef __TDE_HAVE_TDEHWLIB
cardLoginUser = TQString::null; cardLoginUser = TQString::null;
userView->setEnabled(false); userView->setEnabled(false);
verify->lockUserEntry(false); verify->lockUserEntry(false);
@ -952,6 +957,7 @@ void KGreeter::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice) {
verify->cardLoginInProgress = false; verify->cardLoginInProgress = false;
verify->cardLoginDevice = NULL; verify->cardLoginDevice = NULL;
#endif
} }
KStdGreeter::KStdGreeter() KStdGreeter::KStdGreeter()
@ -1332,9 +1338,11 @@ KThemedGreeter::updateStatus( bool fail, bool caps, int timedleft )
} }
} }
#ifdef __TDE_HAVE_TDEHWLIB
if (cardLoginUser != TQString::null) { if (cardLoginUser != TQString::null) {
verify->setPasswordPrompt(i18n("PIN:")); verify->setPasswordPrompt(i18n("PIN:"));
} }
#endif
} }
void void

@ -32,10 +32,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "themer/tdmitem.h" #include "themer/tdmitem.h"
#include "themer/tdmlabel.h" #include "themer/tdmlabel.h"
#include <ksslcertificate.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <ksslcertificate.h>
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#include <tdecryptographiccarddevice.h> #include <tdecryptographiccarddevice.h>
#endif
#include <tdeapplication.h> #include <tdeapplication.h>
#include <tdelocale.h> #include <tdelocale.h>
@ -98,8 +100,10 @@ KGVerify::KGVerify(KGVerifyHandler *_handler, KdmThemer *_themer,
, isClear(true) , isClear(true)
, inGreeterPlugin(false) , inGreeterPlugin(false)
, abortRequested(false) , abortRequested(false)
#ifdef __TDE_HAVE_TDEHWLIB
, cardLoginInProgress(false) , cardLoginInProgress(false)
, cardLoginDevice(NULL) , cardLoginDevice(NULL)
#endif
{ {
connect( &timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()) ); connect( &timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()) );
connect( kapp, TQT_SIGNAL(activity()), TQT_SLOT(slotActivity()) ); connect( kapp, TQT_SIGNAL(activity()), TQT_SLOT(slotActivity()) );
@ -324,7 +328,11 @@ KGVerify::start()
_autoLoginDelay = 0, timeable = false; _autoLoginDelay = 0, timeable = false;
return; return;
} }
else if (!cardLoginInProgress) { else
#ifdef __TDE_HAVE_TDEHWLIB
if (!cardLoginInProgress)
#endif
{
applyPreset(); applyPreset();
} }
} }
@ -664,6 +672,7 @@ KGVerify::handleVerify()
greet->textPrompt(msg, echo, ndelay); greet->textPrompt(msg, echo, ndelay);
inGreeterPlugin = !ndelay; inGreeterPlugin = !ndelay;
#ifdef __TDE_HAVE_TDEHWLIB
if (cardLoginInProgress) { if (cardLoginInProgress) {
TQString autoPIN = cardLoginDevice->autoPIN(); TQString autoPIN = cardLoginDevice->autoPIN();
if (autoPIN != TQString::null) { if (autoPIN != TQString::null) {
@ -673,6 +682,7 @@ KGVerify::handleVerify()
} }
cardLoginInProgress = false; cardLoginInProgress = false;
} }
#endif
} }
else { else {
inGreeterPlugin = true; inGreeterPlugin = true;

@ -77,7 +77,9 @@ class TQPopupMenu;
class TQTimer; class TQTimer;
class KPushButton; class KPushButton;
class KLibrary; class KLibrary;
#ifdef __TDE_HAVE_TDEHWLIB
class TDECryptographicCardDevice; class TDECryptographicCardDevice;
#endif
struct GreeterPluginHandle { struct GreeterPluginHandle {
KLibrary *library; KLibrary *library;
@ -182,8 +184,10 @@ class KGVerify : public TQObject, public KGreeterPluginHandler {
static TQVariant getConf( void *ctx, const char *key, const TQVariant &dflt ); static TQVariant getConf( void *ctx, const char *key, const TQVariant &dflt );
#ifdef __TDE_HAVE_TDEHWLIB
bool cardLoginInProgress; bool cardLoginInProgress;
TDECryptographicCardDevice* cardLoginDevice; TDECryptographicCardDevice* cardLoginDevice;
#endif
}; };
class KGStdVerify : public KGVerify { class KGStdVerify : public KGVerify {

@ -10,10 +10,11 @@
#include <dmctl.h> #include <dmctl.h>
#ifdef __TDE_HAVE_TDEHWLIB
#include <ksslcertificate.h> #include <ksslcertificate.h>
#include <tdehardwaredevices.h> #include <tdehardwaredevices.h>
#include <tdecryptographiccarddevice.h> #include <tdecryptographiccarddevice.h>
#endif
#include <tdeapplication.h> #include <tdeapplication.h>
#include <tdelocale.h> #include <tdelocale.h>
@ -135,6 +136,7 @@ SAKDlg::SAKDlg(TQWidget *parent)
connect(mSAKProcess, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotSAKProcessExited())); connect(mSAKProcess, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotSAKProcessExited()));
mSAKProcess->start(); mSAKProcess->start();
#ifdef __TDE_HAVE_TDEHWLIB
// Initialize SmartCard readers // Initialize SmartCard readers
TDEGenericDevice *hwdevice; TDEGenericDevice *hwdevice;
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices(); TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
@ -145,6 +147,7 @@ SAKDlg::SAKDlg(TQWidget *parent)
connect(cdevice, TQT_SIGNAL(cardRemoved(TDECryptographicCardDevice*)), this, TQT_SLOT(cryptographicCardRemoved(TDECryptographicCardDevice*))); connect(cdevice, TQT_SIGNAL(cardRemoved(TDECryptographicCardDevice*)), this, TQT_SLOT(cryptographicCardRemoved(TDECryptographicCardDevice*)));
cdevice->enableCardMonitoring(true); cdevice->enableCardMonitoring(true);
} }
#endif
mControlPipeHandlerThread = new TQEventLoopThread(); mControlPipeHandlerThread = new TQEventLoopThread();
mControlPipeHandler = new ControlPipeHandlerObject(); mControlPipeHandler = new ControlPipeHandlerObject();
@ -172,6 +175,7 @@ void SAKDlg::processInputPipeCommand(TQString command) {
} }
void SAKDlg::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) { void SAKDlg::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) {
#ifdef __TDE_HAVE_TDEHWLIB
TQString login_name = TQString::null; TQString login_name = TQString::null;
X509CertificatePtrList certList = cdevice->cardX509Certificates(); X509CertificatePtrList certList = cdevice->cardX509Certificates();
if (certList.count() > 0) { if (certList.count() > 0) {
@ -213,10 +217,13 @@ void SAKDlg::cryptographicCardInserted(TDECryptographicCardDevice* cdevice) {
closeDialogForced(); closeDialogForced();
} }
} }
#endif
} }
void SAKDlg::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice) { void SAKDlg::cryptographicCardRemoved(TDECryptographicCardDevice* cdevice) {
#ifdef __TDE_HAVE_TDEHWLIB
// //
#endif
} }
SAKDlg::~SAKDlg() SAKDlg::~SAKDlg()

Loading…
Cancel
Save