• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
  • tdehw
tdecryptographiccarddevice_private.h
1 
2 /* This file is part of the TDE libraries
3  Copyright (C) 2015 Timothy Pearson <kb9vqf@pearsoncomputing.net>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef _TDECRYPTOGRAPHICCARDDEVICE_PRIVATE_H
21 #define _TDECRYPTOGRAPHICCARDDEVICE_PRIVATE_H
22 
23 #include "tdegenericdevice.h"
24 
25 #ifdef WITH_PCSC
26  #include <pcsclite.h>
27  #include <wintypes.h>
28  #include <winscard.h>
29  #include <reader.h>
30 #endif
31 
32 #ifdef WITH_PKCS
33  #include <pkcs11-helper-1.0/pkcs11h-certificate.h>
34  #include <pkcs11-helper-1.0/pkcs11h-openssl.h>
35  #include <openssl/x509v3.h>
36  #define PKCS11H_PROMPT_MASK_ALLOW_NONE (PKCS11H_PROMPT_MASK_ALLOW_ALL & ~PKCS11H_PROMPT_MASK_ALLOW_ALL)
37 #endif
38 
39 class TDECryptographicCardDevice;
40 
41 class CryptoCardDeviceWatcher : public TQObject
42 {
43  TQ_OBJECT
44 
45  public:
46  CryptoCardDeviceWatcher();
47  ~CryptoCardDeviceWatcher();
48 
49  public slots:
50  void run();
51  void requestTermination();
52  TQString getCardATR(TQString readerName);
53  int retrieveCardCertificates(TQString readerName);
54 
55  signals:
56  void statusChanged(TQString, TQString);
57  void pinRequested(TQString);
58 
59  public:
60  int initializePkcs();
61  TQString doPinRequest(TQString prompt);
62  void setProvidedPin(TQString pin);
63  void retrySamePin(bool enable);
64  void enablePINEntryCallbacks(bool enable);
65 
66  public:
67  TDECryptographicCardDevice *cardDevice;
68 
69  private:
70  void deleteAllCertificatesFromCache();
71 
72  private:
73  bool m_terminationRequested;
74  bool m_pinCallbacksEnabled;
75  TQString m_cardPIN;
76  bool m_cardPINPromptDone;
77  bool m_cardReusePIN;
78 #ifdef WITH_PCSC
79  SCARDCONTEXT m_cardContext;
80  SCARD_READERSTATE *m_readerStates;
81 #endif
82 };
83 
84 #endif // _TDECRYPTOGRAPHICCARDDEVICE_PRIVATE_H

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.1
This website is maintained by Timothy Pearson.