Qt Cryptographic Architecture
|
Go to the documentation of this file.
33 #ifndef QCA_KEYSTORE_H
34 #define QCA_KEYSTORE_H
41 class KeyStoreTracker;
42 class KeyStoreManagerPrivate;
43 class KeyStorePrivate;
328 friend class KeyStoreTracker;
390 friend class Private;
598 friend class KeyStorePrivate;
601 friend class KeyStoreManagerPrivate;
690 QSharedDataPointer<Private> d;
731 static void start(
const QString &provider);
786 friend class KeyStoreManagerPrivate;
787 KeyStoreManagerPrivate *d;
790 friend class KeyStorePrivate;
793 static void shutdown();
bool isNull() const
Test if this key is empty (null)
KeyStore(const QString &id, KeyStoreManager *keyStoreManager)
Obtain a specific KeyStore.
QString id() const
The ID associated with the key stored in this object.
@ Application
for caching accepted self-signed certificates
Definition: qca_keystore.h:427
QString storeId() const
The id of the KeyStore for this key object.
QString writeEntry(const KeyBundle &kb)
Add a entry to the KeyStore.
Single entry in a KeyStore.
Definition: qca_keystore.h:141
QString storeName() const
The name of the KeyStore for this key object.
Key store information, outside of a KeyStore object.
Definition: qca_keystore.h:624
void busyStarted()
emitted when the manager has started looking for key stores
KeyStoreEntry(const QString &serialized)
Create a passive KeyStoreEntry based on a serialized string.
KeyStoreEntry entry() const
The KeyStoreEntry that is being monitored.
static KeyStoreEntry fromString(const QString &serialized)
Load a passive entry by using a serialized string as input.
bool ensureAvailable()
Returns true if the entry is available, otherwise false.
void keyStoreAvailable(const QString &id)
emitted when a new key store becomes available
QString writeEntry(const PGPKey &key)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Class to monitor the availability of a KeyStoreEntry.
Definition: qca_keystore.h:351
QString writeEntry(const Certificate &cert)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Access keystores, and monitor keystores for changes.
Definition: qca_keystore.h:710
KeyStoreInfo(const KeyStoreInfo &from)
Copy constructor.
bool holdsTrustedCertificates() const
test if the KeyStore holds trusted certificates (and CRLs)
static void start(const QString &provider)
Initialize a specific key store provider.
void unavailable()
This signal is emitted when the entry that is being monitored becomes unavailble.
bool ensureAccess()
Like ensureAvailable, but will also ensure that the PIN is provided if needed.
PGPKey pgpPublicKey() const
If the key stored in this object is either an public or private PGP key, extract the public key part ...
QCA - the Qt Cryptographic Architecture.
Definition: qca_basic.h:41
General superclass for an algorithm.
Definition: qca_core.h:1152
QString name() const
The name associated with the key stored in this object.
static void clearDiagnosticText()
Clears the diagnostic result log.
Type
The type of entry in the KeyStore.
Definition: qca_keystore.h:147
Header file for PGP key and X.509 certificate related classes.
bool isValid() const
Check if this KeyStore is valid.
@ User
objects such as Apple Keychain, KDE Wallet
Definition: qca_keystore.h:426
KeyStoreEntry()
Create an empty KeyStoreEntry.
@ System
objects such as root certificates
Definition: qca_keystore.h:425
bool isReadOnly() const
Test if the KeyStore is writeable or not.
KeyStoreInfo & operator=(const KeyStoreInfo &from)
Assignment operator.
bool isAccessible() const
Test if the key is currently accessible.
KeyStoreEntry & operator=(const KeyStoreEntry &from)
Standard assignment operator.
QStringList keyStores() const
A list of all the key stores.
void sync()
If you are not using the eventloop, call this to update the object state to the present.
void unavailable()
Emitted when the KeyStore becomes unavailable.
void entryWritten(const QString &entryId)
Emitted when an entry has been written, in asynchronous mode.
General purpose key storage object.
Definition: qca_keystore.h:417
void updated()
Emitted when the KeyStore is changed.
QString id() const
The ID associated with the KeyStore.
void busyFinished()
emitted when the manager has finished looking for key stores
Public Key (X.509) certificate.
Definition: qca_cert.h:849
Certificate Revocation List
Definition: qca_cert.h:1703
Certificate chain and private key pair.
Definition: qca_cert.h:2136
bool holdsPGPPublicKeys() const
test if the KeyStore holds PGPPublicKey objects
KeyStoreInfo(KeyStore::Type type, const QString &id, const QString &name)
Standard constructor.
bool isBusy() const
Indicates if the manager is busy looking for key stores.
QString name() const
The descriptive name of the KeyStore that this KeyStoreInfo object describes.
static QString diagnosticText()
The diagnostic result of key store operations, such as warnings and errors.
void available()
This signal is emitted when the entry that is being monitored becomes available.
QString toString() const
Serialize into a string for use as a passive entry.
Header file for core QCA infrastructure.
@ SmartCard
for smartcards
Definition: qca_keystore.h:428
KeyBundle keyBundle() const
If a KeyBundle is stored in this object, return that bundle.
KeyStoreManager(QObject *parent=nullptr)
Create a new KeyStoreManager.
bool isAvailable() const
Test if the key is available for use.
QString name() const
The name associated with the KeyStore.
Type
The type of keystore.
Definition: qca_keystore.h:424
Certificate certificate() const
If a Certificate is stored in this object, return that certificate.
static void start()
Initialize all key store providers.
Type type() const
The KeyStore Type.
KeyStoreEntry(const KeyStoreEntry &from)
Standard copy constructor.
QString writeEntry(const CRL &crl)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool removeEntry(const QString &id)
Delete the a specified KeyStoreEntry from this KeyStore.
bool isNull() const
Test if this object is valid.
KeyStoreInfo()
Constructor.
void waitForBusyFinished()
Blocks until the manager is done looking for key stores.
void startAsynchronousMode()
Turns on asynchronous mode for this KeyStore instance.
QString id() const
The unique identification of the KeyStore that this KeyStoreInfo object describes.
Pretty Good Privacy key.
Definition: qca_cert.h:2361
bool holdsIdentities() const
test if the KeyStore holds identities (eg KeyBundle or PGPSecretKey)
PGPKey pgpSecretKey() const
If the key stored in this object is a private PGP key, return the contents of that key.
CRL crl() const
If a CRL is stored in this object, return the value of the CRL.
KeyStoreEntryWatcher(const KeyStoreEntry &e, QObject *parent=nullptr)
Standard constructor.
void entryRemoved(bool success)
Emitted when an entry has been removed, in asynchronous mode.
Type type() const
Determine the type of key stored in this object.
KeyStore::Type type() const
The Type of KeyStore that this KeyStoreInfo object describes.
QList< KeyStoreEntry > entryList() const
A list of the KeyStoreEntry objects in this store.