#include <QtCrypto>
Public Types | |
enum | Type { System, User, Application, SmartCard, PGPKeyring } |
Signals | |
void | entryRemoved (bool success) |
void | entryWritten (const QString &entryId) |
void | unavailable () |
void | updated () |
Public Member Functions | |
QList< KeyStoreEntry > | entryList () const |
bool | holdsIdentities () const |
bool | holdsPGPPublicKeys () const |
bool | holdsTrustedCertificates () const |
QString | id () const |
bool | isReadOnly () const |
bool | isValid () const |
KeyStore (const QString &id, KeyStoreManager *keyStoreManager) | |
QString | name () const |
bool | removeEntry (const QString &id) |
void | startAsynchronousMode () |
Type | type () const |
QString | writeEntry (const PGPKey &key) |
QString | writeEntry (const CRL &crl) |
QString | writeEntry (const Certificate &cert) |
QString | writeEntry (const KeyBundle &kb) |
Friends | |
class | KeyStoreManagerPrivate |
class | KeyStorePrivate |
Examples of use of this are:
enum QCA::KeyStore::Type |
QCA::KeyStore::KeyStore | ( | const QString & | id, | |
KeyStoreManager * | keyStoreManager | |||
) |
Obtain a specific KeyStore.
id | the identification for the key store | |
keyStoreManager | the parent manager for this keystore |
QList<KeyStoreEntry> QCA::KeyStore::entryList | ( | ) | const |
A list of the KeyStoreEntry objects in this store.
void QCA::KeyStore::entryRemoved | ( | bool | success | ) | [signal] |
Emitted when an entry has been removed, in asynchronous mode.
success | indicates if the removal succeeded (true) or not (false). |
void QCA::KeyStore::entryWritten | ( | const QString & | entryId | ) | [signal] |
Emitted when an entry has been written, in asynchronous mode.
entryId | is the newly written entry id on success, or an empty string if the write failed. |
bool QCA::KeyStore::holdsIdentities | ( | ) | const |
bool QCA::KeyStore::holdsPGPPublicKeys | ( | ) | const |
test if the KeyStore holds PGPPublicKey objects
bool QCA::KeyStore::holdsTrustedCertificates | ( | ) | const |
test if the KeyStore holds trusted certificates (and CRLs)
bool QCA::KeyStore::isReadOnly | ( | ) | const |
bool QCA::KeyStore::isValid | ( | ) | const |
bool QCA::KeyStore::removeEntry | ( | const QString & | id | ) |
Delete the a specified KeyStoreEntry from this KeyStore.
id | the ID for the entry to be deleted |
void QCA::KeyStore::startAsynchronousMode | ( | ) |
Turns on asynchronous mode for this KeyStore instance.
Normally, entryList() and writeEntry() are blocking calls. However, if startAsynchronousMode() is called, then these functions will return immediately. entryList() will return with the latest known entries, or an empty list if none are known yet (in this mode, updated() will be emitted once the initial entries are known, even if the store has not actually been altered). writeEntry() will always return an empty string, and the entryWritten() signal indicates the result of a write.
Type QCA::KeyStore::type | ( | ) | const |
void QCA::KeyStore::unavailable | ( | ) | [signal] |
Emitted when the KeyStore becomes unavailable.
void QCA::KeyStore::updated | ( | ) | [signal] |
QString QCA::KeyStore::writeEntry | ( | const Certificate & | cert | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
cert | the Certificate to add to the KeyStore |
Add a entry to the KeyStore.
Returns the entryId of the written entry or an empty string on failure.