summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw/tdecryptographiccarddevice.h
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-06 00:05:26 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-06 00:05:26 -0500
commit4c2ff1ca1938eba91de28dfe1d838953f8d89237 (patch)
treecc7c223826273b1b1eb7c51dd92d23453f74a722 /tdecore/tdehw/tdecryptographiccarddevice.h
parenta837e1327eeb8a04f168b5817bfe61ff41a46744 (diff)
downloadtdelibs-4c2ff1ca1938eba91de28dfe1d838953f8d89237.tar.gz
tdelibs-4c2ff1ca1938eba91de28dfe1d838953f8d89237.zip
Add preliminary X509 certificate read from cryptographic cards
Diffstat (limited to 'tdecore/tdehw/tdecryptographiccarddevice.h')
-rw-r--r--tdecore/tdehw/tdecryptographiccarddevice.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/tdecore/tdehw/tdecryptographiccarddevice.h b/tdecore/tdehw/tdecryptographiccarddevice.h
index 7d7a8dafc..2ffdc1a75 100644
--- a/tdecore/tdehw/tdecryptographiccarddevice.h
+++ b/tdecore/tdehw/tdecryptographiccarddevice.h
@@ -22,9 +22,13 @@
#include "tdegenericdevice.h"
+class x509_st;
class TQEventLoopThread;
class CryptoCardDeviceWatcher;
+typedef TQPtrList<x509_st> X509CertificatePtrList;
+typedef TQPtrListIterator<x509_st> X509CertificatePtrListIterator;
+
class TDECORE_EXPORT TDECryptographicCardDevice : public TDEGenericDevice
{
Q_OBJECT
@@ -57,11 +61,21 @@ class TDECORE_EXPORT TDECryptographicCardDevice : public TDEGenericDevice
/**
* If monitoring of insert / remove events is enabled,
- * and a card has been inserted, return the card's ATR.
+ * and a card has been inserted, @return the card's ATR.
* @return TQString::null if no card or card status unknown.
*/
TQString cardATR();
+ /**
+ * If monitoring of insert / remove events is enabled,
+ * and a card has been inserted, @return a list of all
+ * X509 certificates on the card.
+ * @return an empty list if no card or card contents unknown.
+ *
+ * @example KSSLCertificate* tdeCert = KSSLCertificate::fromX509(cardX509Certificates().first());
+ */
+ X509CertificatePtrList cardX509Certificates();
+
public slots:
void cardStatusChanged(TQString status, TQString atr);
@@ -75,8 +89,10 @@ class TDECORE_EXPORT TDECryptographicCardDevice : public TDEGenericDevice
bool m_cardPresent;
TQString m_cardATR;
+ X509CertificatePtrList m_cardCertificates;
friend class TDEHardwareDevices;
+ friend class CryptoCardDeviceWatcher;
};
#endif // _TDECRYPTOGRAPHICCARDDEVICE_H