qcaprovider.h
Go to the documentation of this file.
/*
* qcaprovider.h - QCA Plugin API
* Copyright (C) 2003-2007 Justin Karneges <justin@affinix.com>
* Copyright (C) 2004,2005 Brad Hards <bradh@frogmouth.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef QCAPROVIDER_H
#define QCAPROVIDER_H
#include "qca_basic.h"
#include "qca_cert.h"
#include "qca_core.h"
#include "qca_keystore.h"
#include "qca_publickey.h"
#include "qca_securelayer.h"
#include "qca_securemessage.h"
#include <limits>
#ifndef DOXYGEN_NO_PROVIDER_API
class QCA_EXPORT QCAPlugin
{
public:
virtual ~QCAPlugin()
{
}
virtual QCA::Provider *createProvider() = 0;
};
Q_DECLARE_INTERFACE(QCAPlugin, "com.affinix.qca.Plugin/1.0")
namespace QCA {
class QCA_EXPORT InfoContext : public BasicContext
{
Q_OBJECT
public:
InfoContext(Provider *p)
: BasicContext(p, QStringLiteral("info"))
{
}
virtual QStringList supportedHashTypes() const;
virtual QStringList supportedCipherTypes() const;
virtual QStringList supportedMACTypes() const;
};
class QCA_EXPORT RandomContext : public BasicContext
{
Q_OBJECT
public:
RandomContext(Provider *p)
: BasicContext(p, QStringLiteral("random"))
{
}
virtual SecureArray nextBytes(int size) = 0;
};
class QCA_EXPORT HashContext : public BasicContext
{
Q_OBJECT
public:
HashContext(Provider *p, const QString &type)
: BasicContext(p, type)
{
}
virtual void clear() = 0;
virtual void update(const MemoryRegion &a) = 0;
virtual MemoryRegion final() = 0;
};
class QCA_EXPORT CipherContext : public BasicContext
{
Q_OBJECT
public:
CipherContext(Provider *p, const QString &type)
: BasicContext(p, type)
{
}
virtual void setup(Direction dir, const SymmetricKey &key, const InitializationVector &iv, const AuthTag &tag) = 0;
virtual KeyLength keyLength() const = 0;
virtual int blockSize() const = 0;
virtual AuthTag tag() const = 0;
virtual bool update(const SecureArray &in, SecureArray *out) = 0;
virtual bool final(SecureArray *out) = 0;
};
class QCA_EXPORT MACContext : public BasicContext
{
Q_OBJECT
public:
MACContext(Provider *p, const QString &type)
: BasicContext(p, type)
{
}
virtual void setup(const SymmetricKey &key) = 0;
virtual KeyLength keyLength() const = 0;
virtual void update(const MemoryRegion &in) = 0;
virtual void final(MemoryRegion *out) = 0;
protected:
KeyLength anyKeyLength() const
{
// this is used instead of a default implementation to make sure that
// provider authors think about it, at least a bit.
// See Meyers, Effective C++, Effective C++ (2nd Ed), Item 36
return KeyLength(0, INT_MAX, 1);
}
};
class QCA_EXPORT KDFContext : public BasicContext
{
Q_OBJECT
public:
KDFContext(Provider *p, const QString &type)
: BasicContext(p, type)
{
}
virtual SymmetricKey makeKey(const SecureArray &secret,
const InitializationVector &salt,
unsigned int keyLength,
unsigned int iterationCount) = 0;
virtual SymmetricKey makeKey(const SecureArray &secret,
const InitializationVector &salt,
unsigned int keyLength,
int msecInterval,
unsigned int *iterationCount) = 0;
};
class QCA_EXPORT HKDFContext : public BasicContext
{
Q_OBJECT
public:
HKDFContext(Provider *p, const QString &type)
: BasicContext(p, type)
{
}
virtual SymmetricKey makeKey(const SecureArray &secret,
const InitializationVector &salt,
const InitializationVector &info,
unsigned int keyLength) = 0;
};
class QCA_EXPORT DLGroupContext : public Provider::Context
{
Q_OBJECT
public:
DLGroupContext(Provider *p)
: Provider::Context(p, QStringLiteral("dlgroup"))
{
}
virtual QList<DLGroupSet> supportedGroupSets() const = 0;
virtual bool isNull() const = 0;
virtual void fetchGroup(DLGroupSet set, bool block) = 0;
virtual void getResult(BigInteger *p, BigInteger *q, BigInteger *g) const = 0;
Q_SIGNALS:
void finished();
};
class QCA_EXPORT PKeyBase : public BasicContext
{
Q_OBJECT
public:
PKeyBase(Provider *p, const QString &type);
virtual bool isNull() const = 0;
virtual PKey::Type type() const = 0;
virtual bool isPrivate() const = 0;
virtual bool canExport() const = 0;
virtual void convertToPublic() = 0;
virtual int bits() const = 0;
virtual int maximumEncryptSize(EncryptionAlgorithm alg) const;
virtual SecureArray encrypt(const SecureArray &in, EncryptionAlgorithm alg);
virtual bool decrypt(const SecureArray &in, SecureArray *out, EncryptionAlgorithm alg);
virtual void startSign(SignatureAlgorithm alg, SignatureFormat format);
virtual void startVerify(SignatureAlgorithm alg, SignatureFormat format);
virtual void update(const MemoryRegion &in);
virtual QByteArray endSign();
virtual bool endVerify(const QByteArray &sig);
virtual SymmetricKey deriveKey(const PKeyBase &theirs);
Q_SIGNALS:
void finished();
};
class QCA_EXPORT RSAContext : public PKeyBase
{
Q_OBJECT
public:
RSAContext(Provider *p)
: PKeyBase(p, QStringLiteral("rsa"))
{
}
virtual void createPrivate(int bits, int exp, bool block) = 0;
virtual void createPrivate(const BigInteger &n,
const BigInteger &e,
const BigInteger &p,
const BigInteger &q,
const BigInteger &d) = 0;
virtual void createPublic(const BigInteger &n, const BigInteger &e) = 0;
virtual BigInteger n() const = 0;
virtual BigInteger e() const = 0;
virtual BigInteger p() const = 0;
virtual BigInteger q() const = 0;
virtual BigInteger d() const = 0;
};
class QCA_EXPORT DSAContext : public PKeyBase
{
Q_OBJECT
public:
DSAContext(Provider *p)
: PKeyBase(p, QStringLiteral("dsa"))
{
}
virtual void createPrivate(const DLGroup &domain, bool block) = 0;
virtual void createPrivate(const DLGroup &domain, const BigInteger &y, const BigInteger &x) = 0;
virtual void createPublic(const DLGroup &domain, const BigInteger &y) = 0;
virtual DLGroup domain() const = 0;
virtual BigInteger y() const = 0;
virtual BigInteger x() const = 0;
};
class QCA_EXPORT DHContext : public PKeyBase
{
Q_OBJECT
public:
DHContext(Provider *p)
: PKeyBase(p, QStringLiteral("dh"))
{
}
virtual void createPrivate(const DLGroup &domain, bool block) = 0;
virtual void createPrivate(const DLGroup &domain, const BigInteger &y, const BigInteger &x) = 0;
virtual void createPublic(const DLGroup &domain, const BigInteger &y) = 0;
virtual DLGroup domain() const = 0;
virtual BigInteger y() const = 0;
virtual BigInteger x() const = 0;
};
class QCA_EXPORT PKeyContext : public BasicContext
{
Q_OBJECT
public:
PKeyContext(Provider *p)
: BasicContext(p, QStringLiteral("pkey"))
{
}
virtual QList<PKey::Type> supportedTypes() const = 0;
virtual QList<PKey::Type> supportedIOTypes() const = 0;
virtual QList<PBEAlgorithm> supportedPBEAlgorithms() const = 0;
virtual PKeyBase *key() = 0;
virtual const PKeyBase *key() const = 0;
virtual void setKey(PKeyBase *key) = 0;
virtual bool importKey(const PKeyBase *key) = 0;
virtual QByteArray publicToDER() const;
virtual QString publicToPEM() const;
virtual ConvertResult publicFromDER(const QByteArray &a);
virtual ConvertResult publicFromPEM(const QString &s);
virtual SecureArray privateToDER(const SecureArray &passphrase, PBEAlgorithm pbe) const;
virtual QString privateToPEM(const SecureArray &passphrase, PBEAlgorithm pbe) const;
virtual ConvertResult privateFromDER(const SecureArray &a, const SecureArray &passphrase);
virtual ConvertResult privateFromPEM(const QString &s, const SecureArray &passphrase);
};
class QCA_EXPORT CertBase : public BasicContext
{
Q_OBJECT
public:
CertBase(Provider *p, const QString &type)
: BasicContext(p, type)
{
}
virtual QByteArray toDER() const = 0;
virtual QString toPEM() const = 0;
virtual ConvertResult fromDER(const QByteArray &a) = 0;
virtual ConvertResult fromPEM(const QString &s) = 0;
};
class QCA_EXPORT CertContextProps
{
public:
int version;
QDateTime start;
QDateTime end;
CertificateInfoOrdered subject;
CertificateInfoOrdered issuer;
Constraints constraints;
QStringList policies;
QStringList crlLocations;
QStringList issuerLocations;
QStringList ocspLocations;
BigInteger serial;
bool isCA;
bool isSelfSigned;
int pathLimit;
QByteArray sig;
SignatureAlgorithm sigalgo;
QByteArray subjectId;
QByteArray issuerId;
QString challenge;
CertificateRequestFormat format;
};
class QCA_EXPORT CRLContextProps
{
public:
CertificateInfoOrdered issuer;
int number;
QDateTime thisUpdate;
QDateTime nextUpdate;
QList<CRLEntry> revoked;
QByteArray sig;
SignatureAlgorithm sigalgo;
QByteArray issuerId;
};
class CRLContext;
class QCA_EXPORT CertContext : public CertBase
{
Q_OBJECT
public:
CertContext(Provider *p)
: CertBase(p, QStringLiteral("cert"))
{
}
virtual bool createSelfSigned(const CertificateOptions &opts, const PKeyContext &priv) = 0;
virtual const CertContextProps *props() const = 0;
virtual bool compare(const CertContext *other) const = 0;
virtual PKeyContext *subjectPublicKey() const = 0;
virtual bool isIssuerOf(const CertContext *other) const = 0;
virtual Validity validate(const QList<CertContext *> &trusted,
const QList<CertContext *> &untrusted,
const QList<CRLContext *> &crls,
UsageMode u,
ValidateFlags vf) const = 0;
virtual Validity validate_chain(const QList<CertContext *> &chain,
const QList<CertContext *> &trusted,
const QList<CRLContext *> &crls,
UsageMode u,
ValidateFlags vf) const = 0;
};
class QCA_EXPORT CSRContext : public CertBase
{
Q_OBJECT
public:
CSRContext(Provider *p)
: CertBase(p, QStringLiteral("csr"))
{
}
virtual bool canUseFormat(CertificateRequestFormat f) const = 0;
virtual bool createRequest(const CertificateOptions &opts, const PKeyContext &priv) = 0;
virtual const CertContextProps *props() const = 0;
virtual bool compare(const CSRContext *other) const = 0;
virtual PKeyContext *subjectPublicKey() const = 0;
virtual QString toSPKAC() const = 0;
virtual ConvertResult fromSPKAC(const QString &s) = 0;
};
class QCA_EXPORT CRLContext : public CertBase
{
Q_OBJECT
public:
CRLContext(Provider *p)
: CertBase(p, QStringLiteral("crl"))
{
}
virtual const CRLContextProps *props() const = 0;
virtual bool compare(const CRLContext *other) const = 0;
};
class QCA_EXPORT CertCollectionContext : public BasicContext
{
Q_OBJECT
public:
CertCollectionContext(Provider *p)
: BasicContext(p, QStringLiteral("certcollection"))
{
}
virtual QByteArray toPKCS7(const QList<CertContext *> &certs, const QList<CRLContext *> &crls) const = 0;
virtual ConvertResult
fromPKCS7(const QByteArray &a, QList<CertContext *> *certs, QList<CRLContext *> *crls) const = 0;
};
class QCA_EXPORT CAContext : public BasicContext
{
Q_OBJECT
public:
CAContext(Provider *p)
: BasicContext(p, QStringLiteral("ca"))
{
}
virtual void setup(const CertContext &cert, const PKeyContext &priv) = 0;
virtual CertContext *certificate() const = 0;
virtual CertContext *signRequest(const CSRContext &req, const QDateTime &notValidAfter) const = 0;
virtual CertContext *createCertificate(const PKeyContext &pub, const CertificateOptions &opts) const = 0;
virtual CRLContext *createCRL(const QDateTime &nextUpdate) const = 0;
virtual CRLContext *
updateCRL(const CRLContext &crl, const QList<CRLEntry> &entries, const QDateTime &nextUpdate) const = 0;
};
class QCA_EXPORT PKCS12Context : public BasicContext
{
Q_OBJECT
public:
PKCS12Context(Provider *p)
: BasicContext(p, QStringLiteral("pkcs12"))
{
}
virtual QByteArray toPKCS12(const QString &name,
const QList<const CertContext *> &chain,
const PKeyContext &priv,
const SecureArray &passphrase) const = 0;
virtual ConvertResult fromPKCS12(const QByteArray &in,
const SecureArray &passphrase,
QString *name,
QList<CertContext *> *chain,
PKeyContext **priv) const = 0;
};
class QCA_EXPORT PGPKeyContextProps
{
public:
QString keyId;
QStringList userIds;
bool isSecret;
QDateTime creationDate;
QDateTime expirationDate;
QString fingerprint;
bool inKeyring;
bool isTrusted;
};
class QCA_EXPORT PGPKeyContext : public BasicContext
{
Q_OBJECT
public:
PGPKeyContext(Provider *p)
: BasicContext(p, QStringLiteral("pgpkey"))
{
}
virtual const PGPKeyContextProps *props() const = 0;
virtual QByteArray toBinary() const = 0;
virtual QString toAscii() const = 0;
virtual ConvertResult fromBinary(const QByteArray &a) = 0;
virtual ConvertResult fromAscii(const QString &s) = 0;
};
class QCA_EXPORT KeyStoreEntryContext : public BasicContext
{
Q_OBJECT
public:
KeyStoreEntryContext(Provider *p)
: BasicContext(p, QStringLiteral("keystoreentry"))
{
}
virtual KeyStoreEntry::Type type() const = 0;
virtual QString id() const = 0;
virtual QString name() const = 0;
virtual QString storeId() const = 0;
virtual QString storeName() const = 0;
virtual bool isAvailable() const;
virtual QString serialize() const = 0;
virtual KeyBundle keyBundle() const;
virtual Certificate certificate() const;
virtual CRL crl() const;
virtual PGPKey pgpSecretKey() const;
virtual PGPKey pgpPublicKey() const;
virtual bool ensureAccess();
};
class QCA_EXPORT KeyStoreListContext : public Provider::Context
{
Q_OBJECT
public:
KeyStoreListContext(Provider *p)
: Provider::Context(p, QStringLiteral("keystorelist"))
{
}
virtual void start();
virtual void setUpdatesEnabled(bool enabled);
virtual QList<int> keyStores() = 0;
virtual KeyStore::Type type(int id) const = 0;
virtual QString storeId(int id) const = 0;
virtual QString name(int id) const = 0;
virtual bool isReadOnly(int id) const;
virtual QList<KeyStoreEntry::Type> entryTypes(int id) const = 0;
virtual QList<KeyStoreEntryContext *> entryList(int id) = 0;
virtual KeyStoreEntryContext *entry(int id, const QString &entryId);
virtual KeyStoreEntryContext *entryPassive(const QString &serialized);
virtual QString writeEntry(int id, const KeyBundle &kb);
virtual QString writeEntry(int id, const Certificate &cert);
virtual QString writeEntry(int id, const CRL &crl);
virtual QString writeEntry(int id, const PGPKey &key);
virtual bool removeEntry(int id, const QString &entryId);
Q_SIGNALS:
void busyStart();
void busyEnd();
void updated();
void diagnosticText(const QString &str);
void storeUpdated(int id);
};
class QCA_EXPORT TLSSessionContext : public BasicContext
{
Q_OBJECT
public:
TLSSessionContext(Provider *p)
: BasicContext(p, QStringLiteral("tlssession"))
{
}
};
class QCA_EXPORT TLSContext : public Provider::Context
{
Q_OBJECT
public:
class SessionInfo
{
public:
bool isCompressed;
TLS::Version version;
QString cipherSuite;
int cipherBits;
int cipherMaxBits;
TLSSessionContext *id;
};
enum Result
{
Success,
Error,
Continue
};
TLSContext(Provider *p, const QString &type)
: Provider::Context(p, type)
{
}
virtual void reset() = 0;
virtual QStringList supportedCipherSuites(const TLS::Version &version) const = 0;
virtual bool canCompress() const = 0;
virtual bool canSetHostName() const = 0;
virtual int maxSSF() const = 0;
virtual void setup(bool serverMode, const QString &hostName, bool compress) = 0;
virtual void setConstraints(int minSSF, int maxSSF) = 0;
virtual void setConstraints(const QStringList &cipherSuiteList) = 0;
virtual void setTrustedCertificates(const CertificateCollection &trusted) = 0;
virtual void setIssuerList(const QList<CertificateInfoOrdered> &issuerList) = 0;
virtual void setCertificate(const CertificateChain &cert, const PrivateKey &key) = 0;
virtual void setSessionId(const TLSSessionContext &id) = 0;
virtual void shutdown() = 0;
virtual void setMTU(int size);
virtual void start() = 0;
virtual void update(const QByteArray &from_net, const QByteArray &from_app) = 0;
virtual bool waitForResultsReady(int msecs) = 0;
virtual Result result() const = 0;
virtual QByteArray to_net() = 0;
virtual int encoded() const = 0;
virtual QByteArray to_app() = 0;
virtual bool eof() const = 0;
virtual bool clientHelloReceived() const = 0;
virtual bool serverHelloReceived() const = 0;
virtual QString hostName() const = 0;
virtual bool certificateRequested() const = 0;
virtual QList<CertificateInfoOrdered> issuerList() const = 0;
virtual Validity peerCertificateValidity() const = 0;
virtual CertificateChain peerCertificateChain() const = 0;
virtual SessionInfo sessionInfo() const = 0;
virtual QByteArray unprocessed() = 0;
Q_SIGNALS:
void resultsReady();
void dtlsTimeout();
};
class QCA_EXPORT SASLContext : public Provider::Context
{
Q_OBJECT
public:
class HostPort
{
public:
QString addr;
quint16 port;
};
enum Result
{
Success,
Error,
Params,
AuthCheck,
Continue
};
SASLContext(Provider *p)
: Provider::Context(p, QStringLiteral("sasl"))
{
}
virtual void reset() = 0;
virtual void setup(const QString &service,
const QString &host,
const HostPort *local,
const HostPort *remote,
const QString &ext_id,
int ext_ssf) = 0;
virtual void setConstraints(SASL::AuthFlags f, int minSSF, int maxSSF) = 0;
virtual void startClient(const QStringList &mechlist, bool allowClientSendFirst) = 0;
virtual void startServer(const QString &realm, bool disableServerSendLast) = 0;
virtual void serverFirstStep(const QString &mech, const QByteArray *clientInit) = 0;
virtual void nextStep(const QByteArray &from_net) = 0;
virtual void tryAgain() = 0;
virtual void update(const QByteArray &from_net, const QByteArray &from_app) = 0;
virtual bool waitForResultsReady(int msecs) = 0;
virtual Result result() const = 0;
virtual QStringList mechlist() const = 0;
virtual QString mech() const = 0;
virtual bool haveClientInit() const = 0;
virtual QByteArray stepData() const = 0;
virtual QByteArray to_net() = 0;
virtual int encoded() const = 0;
virtual QByteArray to_app() = 0;
virtual int ssf() const = 0;
virtual SASL::AuthCondition authCondition() const = 0;
virtual SASL::Params clientParams() const = 0;
virtual void
setClientParams(const QString *user, const QString *authzid, const SecureArray *pass, const QString *realm) = 0;
virtual QStringList realmlist() const = 0;
virtual QString username() const = 0;
virtual QString authzid() const = 0;
Q_SIGNALS:
void resultsReady();
};
class QCA_EXPORT MessageContext : public Provider::Context
{
Q_OBJECT
public:
enum Operation
{
Encrypt,
Decrypt,
Sign,
Verify,
SignAndEncrypt
};
MessageContext(Provider *p, const QString &type)
: Provider::Context(p, type)
{
}
virtual bool canSignMultiple() const = 0;
virtual SecureMessage::Type type() const = 0;
virtual void reset() = 0;
virtual void setupEncrypt(const SecureMessageKeyList &keys) = 0;
virtual void
setupSign(const SecureMessageKeyList &keys, SecureMessage::SignMode m, bool bundleSigner, bool smime) = 0;
virtual void setupVerify(const QByteArray &detachedSig) = 0;
virtual void start(SecureMessage::Format f, Operation op) = 0;
virtual void update(const QByteArray &in) = 0;
virtual QByteArray read() = 0;
virtual int written() = 0;
virtual void end() = 0;
virtual bool finished() const = 0;
virtual bool waitForFinished(int msecs) = 0;
virtual bool success() const = 0;
virtual SecureMessage::Error errorCode() const = 0;
virtual QByteArray signature() const = 0;
virtual QString hashName() const = 0;
virtual SecureMessageSignatureList signers() const = 0;
virtual QString diagnosticText() const;
Q_SIGNALS:
void updated();
};
class QCA_EXPORT SMSContext : public BasicContext
{
Q_OBJECT
public:
SMSContext(Provider *p, const QString &type)
: BasicContext(p, type)
{
}
virtual void setTrustedCertificates(const CertificateCollection &trusted);
virtual void setUntrustedCertificates(const CertificateCollection &untrusted);
virtual void setPrivateKeys(const QList<SecureMessageKey> &keys);
virtual MessageContext *createMessage() = 0;
};
}
#endif
#endif
QCAPlugin
Provider plugin base class.
Definition qcaprovider.h:83
QCAPlugin::~QCAPlugin
virtual ~QCAPlugin()
Destructs the object.
Definition qcaprovider.h:88
QCAPlugin::createProvider
virtual QCA::Provider * createProvider()=0
Returns a newly allocated Provider instance.
QCA::AuthTag
Container for authentication tag.
Definition qca_core.h:1347
QCA::BasicContext::BasicContext
BasicContext(Provider *parent, const QString &type)
Standard constructor.
QCA::BigInteger
Arbitrary precision integer.
Definition qca_tools.h:571
QCA::CAContext::certificate
virtual CertContext * certificate() const =0
Returns a copy of the CA's certificate.
QCA::CAContext::createCertificate
virtual CertContext * createCertificate(const PKeyContext &pub, const CertificateOptions &opts) const =0
Issue a certificate based on a public key and options, and return the certificate.
QCA::CAContext::CAContext
CAContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:1611
QCA::CAContext::updateCRL
virtual CRLContext * updateCRL(const CRLContext &crl, const QList< CRLEntry > &entries, const QDateTime &nextUpdate) const =0
Update an existing CRL, by examining an old one and creating a new one based on it.
QCA::CAContext::createCRL
virtual CRLContext * createCRL(const QDateTime &nextUpdate) const =0
Create a new CRL and return it.
QCA::CAContext::signRequest
virtual CertContext * signRequest(const CSRContext &req, const QDateTime &notValidAfter) const =0
Issue a certificate based on a certificate request, and return the certificate.
QCA::CAContext::setup
virtual void setup(const CertContext &cert, const PKeyContext &priv)=0
Prepare the object for usage.
QCA::CRLContextProps
X.509 certificate revocation list properties.
Definition qcaprovider.h:1269
QCA::CRLContextProps::number
int number
The CRL number, which increases at each update.
Definition qcaprovider.h:1279
QCA::CRLContextProps::revoked
QList< CRLEntry > revoked
The revoked entries.
Definition qcaprovider.h:1294
QCA::CRLContextProps::sigalgo
SignatureAlgorithm sigalgo
The signature algorithm used by the issuer to sign the CRL.
Definition qcaprovider.h:1304
QCA::CRLContextProps::issuerId
QByteArray issuerId
The issuer id.
Definition qcaprovider.h:1309
QCA::CRLContextProps::sig
QByteArray sig
The signature data of the CRL.
Definition qcaprovider.h:1299
QCA::CRLContextProps::nextUpdate
QDateTime nextUpdate
The time this CRL expires, and the next CRL should be fetched.
Definition qcaprovider.h:1289
QCA::CRLContextProps::issuer
CertificateInfoOrdered issuer
The issuer information of the CRL.
Definition qcaprovider.h:1274
QCA::CRLContextProps::thisUpdate
QDateTime thisUpdate
The time this CRL was created.
Definition qcaprovider.h:1284
QCA::CRLContext
X.509 certificate revocation list provider.
Definition qcaprovider.h:1513
QCA::CRLContext::props
virtual const CRLContextProps * props() const =0
Returns a pointer to the properties of this CRL.
QCA::CRLContext::CRLContext
CRLContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:1521
QCA::CRLContext::compare
virtual bool compare(const CRLContext *other) const =0
Returns true if this CRL is equal to another CRL, otherwise false.
QCA::CRL
Certificate Revocation List
Definition qca_cert.h:1740
QCA::CSRContext
X.509 certificate request provider.
Definition qcaprovider.h:1429
QCA::CSRContext::compare
virtual bool compare(const CSRContext *other) const =0
Returns true if this certificate request is equal to another certificate request, otherwise false.
QCA::CSRContext::toSPKAC
virtual QString toSPKAC() const =0
Convert this certificate request to Netscape SPKAC format, and return the value.
QCA::CSRContext::canUseFormat
virtual bool canUseFormat(CertificateRequestFormat f) const =0
Returns true if the provider of this object supports the specified format, otherwise false.
QCA::CSRContext::CSRContext
CSRContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:1437
QCA::CSRContext::props
virtual const CertContextProps * props() const =0
Returns a pointer to the properties of this certificate request.
QCA::CSRContext::subjectPublicKey
virtual PKeyContext * subjectPublicKey() const =0
Returns a copy of this certificate request's public key.
QCA::CSRContext::createRequest
virtual bool createRequest(const CertificateOptions &opts, const PKeyContext &priv)=0
Create a certificate request based on the given options and private key.
QCA::CSRContext::fromSPKAC
virtual ConvertResult fromSPKAC(const QString &s)=0
Read Netscape SPKAC input and convert it into a certificate request.
QCA::CertBase::toDER
virtual QByteArray toDER() const =0
Convert this object to DER format, and return the value.
QCA::CertBase::CertBase
CertBase(Provider *p, const QString &type)
Standard constructor.
Definition qcaprovider.h:1071
QCA::CertBase::fromDER
virtual ConvertResult fromDER(const QByteArray &a)=0
Read DER-formatted input and convert it into this object.
QCA::CertBase::fromPEM
virtual ConvertResult fromPEM(const QString &s)=0
Read PEM-formatted input and convert it into this object.
QCA::CertBase::toPEM
virtual QString toPEM() const =0
Convert this object to PEM format, and return the value.
QCA::CertCollectionContext::toPKCS7
virtual QByteArray toPKCS7(const QList< CertContext * > &certs, const QList< CRLContext * > &crls) const =0
Create PKCS#7 DER output based on the input certificates and CRLs.
QCA::CertCollectionContext::fromPKCS7
virtual ConvertResult fromPKCS7(const QByteArray &a, QList< CertContext * > *certs, QList< CRLContext * > *crls) const =0
Read PKCS#7 DER input and convert it into a list of certificates and CRLs.
QCA::CertCollectionContext::CertCollectionContext
CertCollectionContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:1559
QCA::CertContextProps
X.509 certificate or certificate request properties.
Definition qcaprovider.h:1126
QCA::CertContextProps::subject
CertificateInfoOrdered subject
The subject information.
Definition qcaprovider.h:1152
QCA::CertContextProps::ocspLocations
QStringList ocspLocations
A list of URIs for OCSP services.
Definition qcaprovider.h:1190
QCA::CertContextProps::version
int version
The X.509 certificate version, usually 3.
Definition qcaprovider.h:1133
QCA::CertContextProps::crlLocations
QStringList crlLocations
A list of URIs for CRLs.
Definition qcaprovider.h:1176
QCA::CertContextProps::issuerLocations
QStringList issuerLocations
A list of URIs for issuer certificates.
Definition qcaprovider.h:1183
QCA::CertContextProps::policies
QStringList policies
The policies.
Definition qcaprovider.h:1169
QCA::CertContextProps::pathLimit
int pathLimit
The path limit.
Definition qcaprovider.h:1215
QCA::CertContextProps::isSelfSigned
bool isSelfSigned
True if the certificate is self-signed.
Definition qcaprovider.h:1210
QCA::CertContextProps::issuerId
QByteArray issuerId
The issuer id.
Definition qcaprovider.h:1239
QCA::CertContextProps::start
QDateTime start
The time the certificate becomes valid (often the time of create).
Definition qcaprovider.h:1140
QCA::CertContextProps::serial
BigInteger serial
The certificate serial number.
Definition qcaprovider.h:1197
QCA::CertContextProps::challenge
QString challenge
The SPKAC challenge value.
Definition qcaprovider.h:1246
QCA::CertContextProps::end
QDateTime end
The time the certificate expires.
Definition qcaprovider.h:1147
QCA::CertContextProps::format
CertificateRequestFormat format
The format used for the certificate request.
Definition qcaprovider.h:1253
QCA::CertContextProps::issuer
CertificateInfoOrdered issuer
The issuer information.
Definition qcaprovider.h:1159
QCA::CertContextProps::sigalgo
SignatureAlgorithm sigalgo
The signature algorithm used to create the signature.
Definition qcaprovider.h:1225
QCA::CertContextProps::sig
QByteArray sig
The signature data.
Definition qcaprovider.h:1220
QCA::CertContextProps::subjectId
QByteArray subjectId
The subject id.
Definition qcaprovider.h:1232
QCA::CertContextProps::constraints
Constraints constraints
The constraints.
Definition qcaprovider.h:1164
QCA::CertContextProps::isCA
bool isCA
True if the certificate is a CA or the certificate request is requesting to be a CA,...
Definition qcaprovider.h:1203
QCA::CertContext
X.509 certificate provider.
Definition qcaprovider.h:1325
QCA::CertContext::compare
virtual bool compare(const CertContext *other) const =0
Returns true if this certificate is equal to another certificate, otherwise false.
QCA::CertContext::isIssuerOf
virtual bool isIssuerOf(const CertContext *other) const =0
Returns true if this certificate is an issuer of another certificate, otherwise false.
QCA::CertContext::validate
virtual Validity validate(const QList< CertContext * > &trusted, const QList< CertContext * > &untrusted, const QList< CRLContext * > &crls, UsageMode u, ValidateFlags vf) const =0
Validate this certificate.
QCA::CertContext::validate_chain
virtual Validity validate_chain(const QList< CertContext * > &chain, const QList< CertContext * > &trusted, const QList< CRLContext * > &crls, UsageMode u, ValidateFlags vf) const =0
Validate a certificate chain.
QCA::CertContext::props
virtual const CertContextProps * props() const =0
Returns a pointer to the properties of this certificate.
QCA::CertContext::subjectPublicKey
virtual PKeyContext * subjectPublicKey() const =0
Returns a copy of this certificate's public key.
QCA::CertContext::createSelfSigned
virtual bool createSelfSigned(const CertificateOptions &opts, const PKeyContext &priv)=0
Create a self-signed certificate based on the given options and private key.
QCA::CertContext::CertContext
CertContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:1333
QCA::CertificateChain
A chain of related Certificates.
Definition qca_cert.h:1226
QCA::CertificateCollection
Bundle of Certificates and CRLs.
Definition qca_cert.h:1929
QCA::CertificateInfoOrdered
Ordered certificate properties type.
Definition qca_cert.h:548
QCA::CertificateOptions
Certificate options
Definition qca_cert.h:610
QCA::Certificate
Public Key (X.509) certificate.
Definition qca_cert.h:857
QCA::CipherContext::CipherContext
CipherContext(Provider *p, const QString &type)
Standard constructor.
Definition qcaprovider.h:240
QCA::CipherContext::setup
virtual void setup(Direction dir, const SymmetricKey &key, const InitializationVector &iv, const AuthTag &tag)=0
Set up the object for encrypt/decrypt.
QCA::CipherContext::tag
virtual AuthTag tag() const =0
Returns the authentication tag for this cipher.
QCA::CipherContext::keyLength
virtual KeyLength keyLength() const =0
Returns the KeyLength for this cipher.
QCA::CipherContext::blockSize
virtual int blockSize() const =0
Returns the block size for this cipher.
QCA::CipherContext::update
virtual bool update(const SecureArray &in, SecureArray *out)=0
Process a chunk of data.
QCA::DHContext::x
virtual BigInteger x() const =0
Returns the private X component of this Diffie-Hellman key.
QCA::DHContext::createPrivate
virtual void createPrivate(const DLGroup &domain, bool block)=0
Generate a Diffie-Hellman private key.
QCA::DHContext::y
virtual BigInteger y() const =0
Returns the public Y component of this Diffie-Hellman key.
QCA::DHContext::domain
virtual DLGroup domain() const =0
Returns the public domain component of this Diffie-Hellman key.
QCA::DHContext::createPublic
virtual void createPublic(const DLGroup &domain, const BigInteger &y)=0
Create a Diffie-Hellman public key based on its numeric components.
QCA::DHContext::DHContext
DHContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:838
QCA::DHContext::createPrivate
virtual void createPrivate(const DLGroup &domain, const BigInteger &y, const BigInteger &x)=0
Create a Diffie-Hellman private key based on its numeric components.
QCA::DLGroupContext::getResult
virtual void getResult(BigInteger *p, BigInteger *q, BigInteger *g) const =0
Obtain the result of the operation.
QCA::DLGroupContext::isNull
virtual bool isNull() const =0
Returns true if there is a result to obtain.
QCA::DLGroupContext::finished
void finished()
Emitted when the fetchGroup() operation completes in non-blocking mode.
QCA::DLGroupContext::DLGroupContext
DLGroupContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:463
QCA::DLGroupContext::fetchGroup
virtual void fetchGroup(DLGroupSet set, bool block)=0
Attempt to create P, Q, and G values from the specified group set.
QCA::DLGroupContext::supportedGroupSets
virtual QList< DLGroupSet > supportedGroupSets() const =0
The DLGroupSets supported by this object.
QCA::DLGroup
A discrete logarithm group.
Definition qca_publickey.h:172
QCA::DSAContext::y
virtual BigInteger y() const =0
Returns the public Y component of this DSA key.
QCA::DSAContext::createPrivate
virtual void createPrivate(const DLGroup &domain, const BigInteger &y, const BigInteger &x)=0
Create a DSA private key based on its numeric components.
QCA::DSAContext::createPrivate
virtual void createPrivate(const DLGroup &domain, bool block)=0
Generate a DSA private key.
QCA::DSAContext::domain
virtual DLGroup domain() const =0
Returns the public domain component of this DSA key.
QCA::DSAContext::createPublic
virtual void createPublic(const DLGroup &domain, const BigInteger &y)=0
Create a DSA public key based on its numeric components.
QCA::DSAContext::x
virtual BigInteger x() const =0
Returns the private X component of this DSA key.
QCA::DSAContext::DSAContext
DSAContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:765
QCA::HKDFContext::makeKey
virtual SymmetricKey makeKey(const SecureArray &secret, const InitializationVector &salt, const InitializationVector &info, unsigned int keyLength)=0
Create a key and return it.
QCA::HKDFContext::HKDFContext
HKDFContext(Provider *p, const QString &type)
Standard constructor.
Definition qcaprovider.h:425
QCA::HashContext::HashContext
HashContext(Provider *p, const QString &type)
Standard constructor.
Definition qcaprovider.h:194
QCA::HashContext::clear
virtual void clear()=0
Reset the object to its initial state.
QCA::HashContext::update
virtual void update(const MemoryRegion &a)=0
Process a chunk of data.
QCA::InfoContext::supportedHashTypes
virtual QStringList supportedHashTypes() const
The hash algorithms supported by the provider.
QCA::InfoContext::supportedMACTypes
virtual QStringList supportedMACTypes() const
The mac algorithms supported by the provider.
QCA::InfoContext::InfoContext
InfoContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:121
QCA::InfoContext::supportedCipherTypes
virtual QStringList supportedCipherTypes() const
The cipher algorithms supported by the provider.
QCA::InitializationVector
Container for initialisation vectors and nonces.
Definition qca_core.h:1310
QCA::KDFContext::makeKey
virtual SymmetricKey makeKey(const SecureArray &secret, const InitializationVector &salt, unsigned int keyLength, int msecInterval, unsigned int *iterationCount)=0
Create a key and return it.
QCA::KDFContext::KDFContext
KDFContext(Provider *p, const QString &type)
Standard constructor.
Definition qcaprovider.h:371
QCA::KDFContext::makeKey
virtual SymmetricKey makeKey(const SecureArray &secret, const InitializationVector &salt, unsigned int keyLength, unsigned int iterationCount)=0
Create a key and return it.
QCA::KeyBundle
Certificate chain and private key pair.
Definition qca_cert.h:2176
QCA::KeyLength
Simple container for acceptable key lengths.
Definition qca_core.h:701
QCA::KeyStoreEntryContext
KeyStoreEntry provider.
Definition qcaprovider.h:1866
QCA::KeyStoreEntryContext::storeId
virtual QString storeId() const =0
Returns the id of the store that contains this entry.
QCA::KeyStoreEntryContext::isAvailable
virtual bool isAvailable() const
Returns true if the private key of this entry is present for use.
QCA::KeyStoreEntryContext::serialize
virtual QString serialize() const =0
Serialize the information about this entry.
QCA::KeyStoreEntryContext::KeyStoreEntryContext
KeyStoreEntryContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:1874
QCA::KeyStoreEntryContext::ensureAccess
virtual bool ensureAccess()
Attempt to ensure the private key of this entry is usable and accessible, potentially prompting the u...
QCA::KeyStoreEntryContext::keyBundle
virtual KeyBundle keyBundle() const
If this entry is of type KeyStoreEntry::TypeKeyBundle, this function returns the KeyBundle of the ent...
QCA::KeyStoreEntryContext::storeName
virtual QString storeName() const =0
Returns the name of the store that contains this entry.
QCA::KeyStoreEntryContext::pgpPublicKey
virtual PGPKey pgpPublicKey() const
If this entry is of type KeyStoreEntry::TypePGPPublicKey or KeyStoreEntry::TypePGPSecretKey,...
QCA::KeyStoreEntryContext::pgpSecretKey
virtual PGPKey pgpSecretKey() const
If this entry is of type KeyStoreEntry::TypePGPSecretKey, this function returns the secret PGPKey of ...
QCA::KeyStoreEntryContext::id
virtual QString id() const =0
Returns the entry id.
QCA::KeyStoreEntryContext::crl
virtual CRL crl() const
If this entry is of type KeyStoreEntry::TypeCRL, this function returns the CRL of the entry.
QCA::KeyStoreEntryContext::certificate
virtual Certificate certificate() const
If this entry is of type KeyStoreEntry::TypeCertificate, this function returns the Certificate of the...
QCA::KeyStoreEntryContext::name
virtual QString name() const =0
Returns the name of this entry.
QCA::KeyStoreEntryContext::type
virtual KeyStoreEntry::Type type() const =0
Returns the entry type.
QCA::KeyStoreEntry::Type
Type
The type of entry in the KeyStore.
Definition qca_keystore.h:147
QCA::KeyStoreListContext::busyEnd
void busyEnd()
Emit this to leave the busy state.
QCA::KeyStoreListContext::writeEntry
virtual QString writeEntry(int id, const Certificate &cert)
Write a Certificate to the store.
QCA::KeyStoreListContext::writeEntry
virtual QString writeEntry(int id, const KeyBundle &kb)
Write a KeyBundle to the store.
QCA::KeyStoreListContext::updated
void updated()
Indicates the list of keystores has changed, and that QCA should call keyStores() to obtain the lates...
QCA::KeyStoreListContext::entry
virtual KeyStoreEntryContext * entry(int id, const QString &entryId)
Returns a single entry in the store, if the entry id is already known.
QCA::KeyStoreListContext::type
virtual KeyStore::Type type(int id) const =0
Returns the type of the specified store, or -1 if the integer context id is invalid.
QCA::KeyStoreListContext::removeEntry
virtual bool removeEntry(int id, const QString &entryId)
Remove an entry from the store.
QCA::KeyStoreListContext::entryTypes
virtual QList< KeyStoreEntry::Type > entryTypes(int id) const =0
Returns the types supported by the store, or an empty list if the integer context id is invalid.
QCA::KeyStoreListContext::entryPassive
virtual KeyStoreEntryContext * entryPassive(const QString &serialized)
Returns a single entry, created from the serialization string of a previous entry (using KeyStoreEntr...
QCA::KeyStoreListContext::storeUpdated
void storeUpdated(int id)
Indicates that the entry list of a keystore has changed (entries added, removed, or modified).
QCA::KeyStoreListContext::keyStores
virtual QList< int > keyStores()=0
Returns a list of integer context ids, each representing a keystore instance.
QCA::KeyStoreListContext::diagnosticText
void diagnosticText(const QString &str)
Emitted when there is diagnostic text to report.
QCA::KeyStoreListContext::busyStart
void busyStart()
Emit this when the provider is busy looking for keystores.
QCA::KeyStoreListContext::KeyStoreListContext
KeyStoreListContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:1982
QCA::KeyStoreListContext::setUpdatesEnabled
virtual void setUpdatesEnabled(bool enabled)
Enables or disables update events.
QCA::KeyStoreListContext::isReadOnly
virtual bool isReadOnly(int id) const
Returns true if the store is read-only.
QCA::KeyStoreListContext::entryList
virtual QList< KeyStoreEntryContext * > entryList(int id)=0
Returns the entries of the store, or an empty list if the integer context id is invalid.
QCA::KeyStoreListContext::start
virtual void start()
Starts the keystore provider.
QCA::KeyStoreListContext::storeId
virtual QString storeId(int id) const =0
Returns the string id of the store, or an empty string if the integer context id is invalid.
QCA::KeyStoreListContext::writeEntry
virtual QString writeEntry(int id, const CRL &crl)
Write a CRL to the store.
QCA::KeyStoreListContext::writeEntry
virtual QString writeEntry(int id, const PGPKey &key)
Write a PGPKey to the store.
QCA::KeyStoreListContext::name
virtual QString name(int id) const =0
Returns the friendly name of the store, or an empty string if the integer context id is invalid.
QCA::KeyStore::Type
Type
The type of keystore.
Definition qca_keystore.h:424
QCA::MACContext::anyKeyLength
KeyLength anyKeyLength() const
Returns a KeyLength that supports any length.
Definition qcaprovider.h:341
QCA::MACContext::setup
virtual void setup(const SymmetricKey &key)=0
Set up the object for hashing.
QCA::MACContext::keyLength
virtual KeyLength keyLength() const =0
Returns the KeyLength for this MAC algorithm.
QCA::MACContext::MACContext
MACContext(Provider *p, const QString &type)
Standard constructor.
Definition qcaprovider.h:306
QCA::MACContext::update
virtual void update(const MemoryRegion &in)=0
Process a chunk of data.
QCA::MemoryRegion
Array of bytes that may be optionally secured.
Definition qca_tools.h:91
QCA::MessageContext
SecureMessage provider.
Definition qcaprovider.h:2913
QCA::MessageContext::read
virtual QByteArray read()=0
Extract output from the message operation.
QCA::MessageContext::start
virtual void start(SecureMessage::Format f, Operation op)=0
Begins the secure message operation.
QCA::MessageContext::diagnosticText
virtual QString diagnosticText() const
Returns any diagnostic text for the operation, potentially useful to show the user in the event the o...
QCA::MessageContext::Operation
Operation
The type of operation being performed.
Definition qcaprovider.h:2920
QCA::MessageContext::Verify
@ Verify
Verify operation.
Definition qcaprovider.h:2924
QCA::MessageContext::Sign
@ Sign
Sign operation.
Definition qcaprovider.h:2923
QCA::MessageContext::SignAndEncrypt
@ SignAndEncrypt
Sign and Encrypt operation.
Definition qcaprovider.h:2925
QCA::MessageContext::Decrypt
@ Decrypt
Decrypt (or Decrypt and Verify) operation.
Definition qcaprovider.h:2922
QCA::MessageContext::Encrypt
@ Encrypt
Encrypt operation.
Definition qcaprovider.h:2921
QCA::MessageContext::setupEncrypt
virtual void setupEncrypt(const SecureMessageKeyList &keys)=0
Configure a new encrypting operation.
QCA::MessageContext::written
virtual int written()=0
Returns the number of input bytes accepted since the last call to update().
QCA::MessageContext::setupVerify
virtual void setupVerify(const QByteArray &detachedSig)=0
Configure a new verify operation.
QCA::MessageContext::hashName
virtual QString hashName() const =0
Returns the name of the hash used to generate the signature, in the case of a signature operation.
QCA::MessageContext::success
virtual bool success() const =0
Returns true if the operation was successful.
QCA::MessageContext::setupSign
virtual void setupSign(const SecureMessageKeyList &keys, SecureMessage::SignMode m, bool bundleSigner, bool smime)=0
Configure a new signing operation.
QCA::MessageContext::MessageContext
MessageContext(Provider *p, const QString &type)
Standard constructor.
Definition qcaprovider.h:2934
QCA::MessageContext::finished
virtual bool finished() const =0
Returns true if the operation has finished, otherwise false.
QCA::MessageContext::update
virtual void update(const QByteArray &in)=0
Provide input to the message operation.
QCA::MessageContext::updated
void updated()
Emitted when there is data to read, if input data has been accepted, or if the operation has finished...
QCA::MessageContext::errorCode
virtual SecureMessage::Error errorCode() const =0
Returns the reason for failure, if the operation was not successful.
QCA::MessageContext::signature
virtual QByteArray signature() const =0
Returns the signature, in the case of a detached signature operation.
QCA::MessageContext::end
virtual void end()=0
Indicates the end of input.
QCA::MessageContext::reset
virtual void reset()=0
Reset the object to its initial state.
QCA::MessageContext::signers
virtual SecureMessageSignatureList signers() const =0
Returns a list of signatures, in the case of a verify or decrypt and verify operation.
QCA::MessageContext::waitForFinished
virtual bool waitForFinished(int msecs)=0
Waits for the secure message operation to complete.
QCA::MessageContext::canSignMultiple
virtual bool canSignMultiple() const =0
Returns true if the provider supports multiple signers for signature creation or signature verificati...
QCA::MessageContext::type
virtual SecureMessage::Type type() const =0
The type of secure message (e.g.
QCA::PGPKeyContextProps
OpenPGP key properties.
Definition qcaprovider.h:1746
QCA::PGPKeyContextProps::isTrusted
bool isTrusted
True if this key is trusted (e.g.
Definition qcaprovider.h:1791
QCA::PGPKeyContextProps::inKeyring
bool inKeyring
True if this key is in a keyring (and thus usable), otherwise false.
Definition qcaprovider.h:1785
QCA::PGPKeyContextProps::userIds
QStringList userIds
List of user id strings for the key, the first one being the primary user id.
Definition qcaprovider.h:1757
QCA::PGPKeyContextProps::creationDate
QDateTime creationDate
The time the key was created.
Definition qcaprovider.h:1767
QCA::PGPKeyContextProps::fingerprint
QString fingerprint
The hex fingerprint of the key.
Definition qcaprovider.h:1779
QCA::PGPKeyContextProps::expirationDate
QDateTime expirationDate
The time the key expires.
Definition qcaprovider.h:1772
QCA::PGPKeyContextProps::keyId
QString keyId
The key id.
Definition qcaprovider.h:1751
QCA::PGPKeyContextProps::isSecret
bool isSecret
True if this key is a secret key, otherwise false.
Definition qcaprovider.h:1762
QCA::PGPKeyContext::toAscii
virtual QString toAscii() const =0
Convert the key to ascii-armored format, and return the value.
QCA::PGPKeyContext::props
virtual const PGPKeyContextProps * props() const =0
Returns a pointer to the properties of this key.
QCA::PGPKeyContext::PGPKeyContext
PGPKeyContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:1813
QCA::PGPKeyContext::toBinary
virtual QByteArray toBinary() const =0
Convert the key to binary format, and return the value.
QCA::PGPKeyContext::fromBinary
virtual ConvertResult fromBinary(const QByteArray &a)=0
Read binary input and convert it into a key.
QCA::PGPKeyContext::fromAscii
virtual ConvertResult fromAscii(const QString &s)=0
Read ascii-armored input and convert it into a key.
QCA::PGPKey
Pretty Good Privacy key.
Definition qca_cert.h:2407
QCA::PKCS12Context::PKCS12Context
PKCS12Context(Provider *p)
Standard constructor.
Definition qcaprovider.h:1692
QCA::PKCS12Context::toPKCS12
virtual QByteArray toPKCS12(const QString &name, const QList< const CertContext * > &chain, const PKeyContext &priv, const SecureArray &passphrase) const =0
Create PKCS#12 DER output based on a set of input items.
QCA::PKCS12Context::fromPKCS12
virtual ConvertResult fromPKCS12(const QByteArray &in, const SecureArray &passphrase, QString *name, QList< CertContext * > *chain, PKeyContext **priv) const =0
Read PKCS#12 DER input and convert it into a set of output items.
QCA::PKeyBase
Public key implementation provider base.
Definition qcaprovider.h:523
QCA::PKeyBase::isNull
virtual bool isNull() const =0
Returns true if this object is not valid.
QCA::PKeyBase::type
virtual PKey::Type type() const =0
Returns the type of public key.
QCA::PKeyBase::convertToPublic
virtual void convertToPublic()=0
If the key is a private key, this function will convert it into a public key (all private key data in...
QCA::PKeyBase::isPrivate
virtual bool isPrivate() const =0
Returns true if this is a private key, otherwise false.
QCA::PKeyBase::bits
virtual int bits() const =0
Returns the number of bits in the key.
QCA::PKeyBase::update
virtual void update(const MemoryRegion &in)
Process the plaintext input data for either signing or verifying, whichever operation is active.
QCA::PKeyBase::decrypt
virtual bool decrypt(const SecureArray &in, SecureArray *out, EncryptionAlgorithm alg)
Decrypt data.
QCA::PKeyBase::PKeyBase
PKeyBase(Provider *p, const QString &type)
Standard constructor.
QCA::PKeyBase::deriveKey
virtual SymmetricKey deriveKey(const PKeyBase &theirs)
Compute a symmetric key based on this private key and some other public key.
QCA::PKeyBase::finished
void finished()
Emitted when an asynchronous operation completes on this key.
QCA::PKeyBase::maximumEncryptSize
virtual int maximumEncryptSize(EncryptionAlgorithm alg) const
Returns the maximum number of bytes that can be encrypted by this key.
QCA::PKeyBase::endVerify
virtual bool endVerify(const QByteArray &sig)
Complete a verify operation, and return true if successful.
QCA::PKeyBase::endSign
virtual QByteArray endSign()
Complete a signing operation, and return the signature value.
QCA::PKeyBase::startVerify
virtual void startVerify(SignatureAlgorithm alg, SignatureFormat format)
Begin a verify operation.
QCA::PKeyBase::encrypt
virtual SecureArray encrypt(const SecureArray &in, EncryptionAlgorithm alg)
Encrypt data.
QCA::PKeyBase::canExport
virtual bool canExport() const =0
Returns true if the components of this key are accessible and whether it can be serialized into an ou...
QCA::PKeyBase::startSign
virtual void startSign(SignatureAlgorithm alg, SignatureFormat format)
Begin a signing operation.
QCA::PKeyContext
Public key container provider.
Definition qcaprovider.h:909
QCA::PKeyContext::privateFromPEM
virtual ConvertResult privateFromPEM(const QString &s, const SecureArray &passphrase)
Read PEM-formatted input and convert it into a private key.
QCA::PKeyContext::publicFromPEM
virtual ConvertResult publicFromPEM(const QString &s)
Read PEM-formatted input and convert it into a public key.
QCA::PKeyContext::key
virtual const PKeyBase * key() const =0
Returns the key held by this object, or 0 if there is no key.
QCA::PKeyContext::supportedPBEAlgorithms
virtual QList< PBEAlgorithm > supportedPBEAlgorithms() const =0
Returns a list of password-based encryption algorithms that are supported for private key serializati...
QCA::PKeyContext::PKeyContext
PKeyContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:917
QCA::PKeyContext::supportedIOTypes
virtual QList< PKey::Type > supportedIOTypes() const =0
Returns a list of public key types that can be serialized and deserialized into DER and PEM format.
QCA::PKeyContext::importKey
virtual bool importKey(const PKeyBase *key)=0
Attempt to import a key from another provider.
QCA::PKeyContext::setKey
virtual void setKey(PKeyBase *key)=0
Sets the key for this object.
QCA::PKeyContext::privateFromDER
virtual ConvertResult privateFromDER(const SecureArray &a, const SecureArray &passphrase)
Read DER-formatted input and convert it into a private key.
QCA::PKeyContext::supportedTypes
virtual QList< PKey::Type > supportedTypes() const =0
Returns a list of supported public key types.
QCA::PKeyContext::key
virtual PKeyBase * key()=0
Returns the key held by this object, or 0 if there is no key.
QCA::PKeyContext::publicToDER
virtual QByteArray publicToDER() const
Convert a public key to DER format, and return the value.
QCA::PKeyContext::publicFromDER
virtual ConvertResult publicFromDER(const QByteArray &a)
Read DER-formatted input and convert it into a public key.
QCA::PKeyContext::publicToPEM
virtual QString publicToPEM() const
Convert a public key to PEM format, and return the value.
QCA::PKeyContext::privateToDER
virtual SecureArray privateToDER(const SecureArray &passphrase, PBEAlgorithm pbe) const
Convert a private key to DER format, and return the value.
QCA::PKeyContext::privateToPEM
virtual QString privateToPEM(const SecureArray &passphrase, PBEAlgorithm pbe) const
Convert a private key to PEM format, and return the value.
QCA::PKey::Type
Type
Types of public key cryptography keys supported by QCA.
Definition qca_publickey.h:257
QCA::PrivateKey
Generic private key.
Definition qca_publickey.h:833
QCA::Provider::Context
Internal context class used for the plugin.
Definition qca_core.h:940
QCA::Provider::Context::Context
Context(Provider *parent, const QString &type)
Standard constructor.
QCA::Provider::Context::type
QString type() const
The type of context, as passed to the constructor.
QCA::Provider
Algorithm provider.
Definition qca_core.h:765
QCA::RSAContext::e
virtual BigInteger e() const =0
Returns the public E component of this RSA key.
QCA::RSAContext::n
virtual BigInteger n() const =0
Returns the public N component of this RSA key.
QCA::RSAContext::p
virtual BigInteger p() const =0
Returns the private P component of this RSA key.
QCA::RSAContext::RSAContext
RSAContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:675
QCA::RSAContext::createPublic
virtual void createPublic(const BigInteger &n, const BigInteger &e)=0
Create an RSA public key based on the two public components.
QCA::RSAContext::d
virtual BigInteger d() const =0
Returns the private D component of this RSA key.
QCA::RSAContext::q
virtual BigInteger q() const =0
Returns the private Q component of this RSA key.
QCA::RSAContext::createPrivate
virtual void createPrivate(const BigInteger &n, const BigInteger &e, const BigInteger &p, const BigInteger &q, const BigInteger &d)=0
Create an RSA private key based on the five components.
QCA::RSAContext::createPrivate
virtual void createPrivate(int bits, int exp, bool block)=0
Generate an RSA private key.
QCA::RandomContext::RandomContext
RandomContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:161
QCA::RandomContext::nextBytes
virtual SecureArray nextBytes(int size)=0
Return an array of random bytes.
QCA::SASLContext::HostPort
Convenience class to hold an IP address and an associated port.
Definition qcaprovider.h:2615
QCA::SASLContext::HostPort::port
quint16 port
The port.
Definition qcaprovider.h:2625
QCA::SASLContext::HostPort::addr
QString addr
The IP address.
Definition qcaprovider.h:2620
QCA::SASLContext::serverFirstStep
virtual void serverFirstStep(const QString &mech, const QByteArray *clientInit)=0
Finishes server startup.
QCA::SASLContext::to_net
virtual QByteArray to_net()=0
Returns data that should be sent across the network (for the security layer).
QCA::SASLContext::authCondition
virtual SASL::AuthCondition authCondition() const =0
Returns the reason for failure, if the authentication was not successful.
QCA::SASLContext::authzid
virtual QString authzid() const =0
Returns the authzid attempting to authorize (server mode only).
QCA::SASLContext::setup
virtual void setup(const QString &service, const QString &host, const HostPort *local, const HostPort *remote, const QString &ext_id, int ext_ssf)=0
Configure a new session.
QCA::SASLContext::username
virtual QString username() const =0
Returns the username attempting to authenticate (server mode only).
QCA::SASLContext::encoded
virtual int encoded() const =0
Returns the number of bytes of plaintext data that is encoded inside of to_net().
QCA::SASLContext::startServer
virtual void startServer(const QString &realm, bool disableServerSendLast)=0
Begins the session in server mode, starting with the authentication.
QCA::SASLContext::tryAgain
virtual void tryAgain()=0
Attempt the most recent operation again.
QCA::SASLContext::clientParams
virtual SASL::Params clientParams() const =0
Returns the needed/optional client parameters.
QCA::SASLContext::stepData
virtual QByteArray stepData() const =0
Returns an authentication payload for to be transmitted over the network.
QCA::SASLContext::SASLContext
SASLContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:2645
QCA::SASLContext::mech
virtual QString mech() const =0
Returns the mechanism selected.
QCA::SASLContext::resultsReady
void resultsReady()
Emit this when a startClient(), startServer(), serverFirstStep(), nextStep(), tryAgain(),...
QCA::SASLContext::waitForResultsReady
virtual bool waitForResultsReady(int msecs)=0
Waits for a startClient(), startServer(), serverFirstStep(), nextStep(), tryAgain(),...
QCA::SASLContext::mechlist
virtual QStringList mechlist() const =0
Returns the mechanism list (server mode only).
QCA::SASLContext::haveClientInit
virtual bool haveClientInit() const =0
Returns true if the client has initialization data.
QCA::SASLContext::ssf
virtual int ssf() const =0
Returns the SSF of the active SASL session.
QCA::SASLContext::to_app
virtual QByteArray to_app()=0
Returns data that is decoded from the network and should be processed by the application.
QCA::SASLContext::setClientParams
virtual void setClientParams(const QString *user, const QString *authzid, const SecureArray *pass, const QString *realm)=0
Set some of the client parameters (pass 0 to not set a field).
QCA::SASLContext::reset
virtual void reset()=0
Reset the object to its initial state.
QCA::SASLContext::realmlist
virtual QStringList realmlist() const =0
Returns the realm list (client mode only).
QCA::SASLContext::update
virtual void update(const QByteArray &from_net, const QByteArray &from_app)=0
Performs one iteration of the SASL security layer processing.
QCA::SASLContext::result
virtual Result result() const =0
Returns the result code of an operation.
QCA::SASLContext::startClient
virtual void startClient(const QStringList &mechlist, bool allowClientSendFirst)=0
Begins the session in client mode, starting with the authentication.
QCA::SASLContext::Result
Result
Result of a SASL operation.
Definition qcaprovider.h:2632
QCA::SASLContext::Params
@ Params
Parameters are needed to complete authentication.
Definition qcaprovider.h:2635
QCA::SASLContext::Success
@ Success
Operation completed.
Definition qcaprovider.h:2633
QCA::SASLContext::Error
@ Error
Operation failed.
Definition qcaprovider.h:2634
QCA::SASLContext::Continue
@ Continue
More steps needed to complete authentication.
Definition qcaprovider.h:2637
QCA::SASLContext::AuthCheck
@ AuthCheck
Client login can be inspected (server only).
Definition qcaprovider.h:2636
QCA::SASLContext::nextStep
virtual void nextStep(const QByteArray &from_net)=0
Perform another step of the SASL authentication.
QCA::SASLContext::setConstraints
virtual void setConstraints(SASL::AuthFlags f, int minSSF, int maxSSF)=0
Set the constraints of the session using SSF values.
QCA::SASL::Params
Parameter flags for the SASL authentication.
Definition qca_securelayer.h:907
QCA::SASL::AuthCondition
AuthCondition
Possible authentication error states.
Definition qca_securelayer.h:849
QCA::SASL::AuthFlags
AuthFlags
Authentication requirement flag values.
Definition qca_securelayer.h:868
QCA::SMSContext::setTrustedCertificates
virtual void setTrustedCertificates(const CertificateCollection &trusted)
Set the trusted certificates and for this secure message system, to be used for validation.
QCA::SMSContext::SMSContext
SMSContext(Provider *p, const QString &type)
Standard constructor.
Definition qcaprovider.h:3111
QCA::SMSContext::setUntrustedCertificates
virtual void setUntrustedCertificates(const CertificateCollection &untrusted)
Set the untrusted certificates and CRLs for this secure message system, to be used for validation.
QCA::SMSContext::setPrivateKeys
virtual void setPrivateKeys(const QList< SecureMessageKey > &keys)
Set the private keys for this secure message system, to be used for decryption.
QCA::SMSContext::createMessage
virtual MessageContext * createMessage()=0
Create a new message object for this system.
QCA::SecureArray
Secure array of bytes.
Definition qca_tools.h:317
QCA::SecureMessage::Type
Type
The type of secure message.
Definition qca_securemessage.h:327
QCA::SecureMessage::Error
Error
Errors for secure messages.
Definition qca_securemessage.h:355
QCA::SecureMessage::SignMode
SignMode
The type of message signature.
Definition qca_securemessage.h:336
QCA::SecureMessage::Format
Format
Formats for secure messages.
Definition qca_securemessage.h:346
QCA::SymmetricKey
Container for keys for symmetric encryption algorithms.
Definition qca_core.h:1264
QCA::TLSContext::SessionInfo
Information about an active TLS connection.
Definition qcaprovider.h:2253
QCA::TLSContext::SessionInfo::cipherSuite
QString cipherSuite
The cipher suite being used for this connection.
Definition qcaprovider.h:2270
QCA::TLSContext::SessionInfo::cipherBits
int cipherBits
The bit size of the cipher used for this connection.
Definition qcaprovider.h:2275
QCA::TLSContext::SessionInfo::isCompressed
bool isCompressed
True if the TLS connection is compressed, otherwise false.
Definition qcaprovider.h:2258
QCA::TLSContext::SessionInfo::id
TLSSessionContext * id
Pointer to the id of this TLS session, for use with resuming.
Definition qcaprovider.h:2287
QCA::TLSContext::SessionInfo::version
TLS::Version version
The TLS protocol version being used for this connection.
Definition qcaprovider.h:2263
QCA::TLSContext::SessionInfo::cipherMaxBits
int cipherMaxBits
The maximum bit size possible of the cipher used for this connection.
Definition qcaprovider.h:2281
QCA::TLSContext::setCertificate
virtual void setCertificate(const CertificateChain &cert, const PrivateKey &key)=0
Set the local certificate.
QCA::TLSContext::peerCertificateValidity
virtual Validity peerCertificateValidity() const =0
Returns the QCA::Validity of the peer certificate.
QCA::TLSContext::sessionInfo
virtual SessionInfo sessionInfo() const =0
Returns information about the active TLS session.
QCA::TLSContext::to_net
virtual QByteArray to_net()=0
Returns data that should be sent across the network.
QCA::TLSContext::maxSSF
virtual int maxSSF() const =0
Returns the maximum SSF supported by this provider.
QCA::TLSContext::to_app
virtual QByteArray to_app()=0
Returns data that is decoded from the network and should be processed by the application.
QCA::TLSContext::clientHelloReceived
virtual bool clientHelloReceived() const =0
Returns true if the TLS client hello has been received.
QCA::TLSContext::result
virtual Result result() const =0
Returns the result code of an operation.
QCA::TLSContext::encoded
virtual int encoded() const =0
Returns the number of bytes of plaintext data that is encoded inside of to_net().
QCA::TLSContext::setConstraints
virtual void setConstraints(const QStringList &cipherSuiteList)=0
This is an overloaded member function, provided for convenience. It differs from the above function o...
QCA::TLSContext::update
virtual void update(const QByteArray &from_net, const QByteArray &from_app)=0
Performs one iteration of the TLS session processing.
QCA::TLSContext::serverHelloReceived
virtual bool serverHelloReceived() const =0
Returns true if the TLS server hello has been received.
QCA::TLSContext::Result
Result
Result of a TLS operation.
Definition qcaprovider.h:2294
QCA::TLSContext::Continue
@ Continue
More data needed to complete operation.
Definition qcaprovider.h:2297
QCA::TLSContext::Success
@ Success
Operation completed.
Definition qcaprovider.h:2295
QCA::TLSContext::Error
@ Error
Operation failed.
Definition qcaprovider.h:2296
QCA::TLSContext::setSessionId
virtual void setSessionId(const TLSSessionContext &id)=0
Set the TLS session id, for session resuming.
QCA::TLSContext::canCompress
virtual bool canCompress() const =0
Returns true if the provider supports compression.
QCA::TLSContext::resultsReady
void resultsReady()
Emit this when a start() or update() operation has completed.
QCA::TLSContext::reset
virtual void reset()=0
Reset the object to its initial state.
QCA::TLSContext::start
virtual void start()=0
Begins the session, starting with the handshake.
QCA::TLSContext::hostName
virtual QString hostName() const =0
Returns the host name sent by the client using server name indication (server mode only).
QCA::TLSContext::setTrustedCertificates
virtual void setTrustedCertificates(const CertificateCollection &trusted)=0
Set the list of trusted certificates.
QCA::TLSContext::setIssuerList
virtual void setIssuerList(const QList< CertificateInfoOrdered > &issuerList)=0
Set the list of acceptable issuers.
QCA::TLSContext::setConstraints
virtual void setConstraints(int minSSF, int maxSSF)=0
Set the constraints of the session using SSF values.
QCA::TLSContext::setMTU
virtual void setMTU(int size)
Set the maximum transmission unit size.
QCA::TLSContext::issuerList
virtual QList< CertificateInfoOrdered > issuerList() const =0
Returns the issuer list sent by the server (client mode only).
QCA::TLSContext::waitForResultsReady
virtual bool waitForResultsReady(int msecs)=0
Waits for a start() or update() operation to complete.
QCA::TLSContext::supportedCipherSuites
virtual QStringList supportedCipherSuites(const TLS::Version &version) const =0
Returns a list of supported cipher suites for the specified SSL/TLS version.
QCA::TLSContext::certificateRequested
virtual bool certificateRequested() const =0
Returns true if the peer is requesting a certificate.
QCA::TLSContext::peerCertificateChain
virtual CertificateChain peerCertificateChain() const =0
Returns the peer certificate chain.
QCA::TLSContext::canSetHostName
virtual bool canSetHostName() const =0
Returns true if the provider supports server name indication.
QCA::TLSContext::unprocessed
virtual QByteArray unprocessed()=0
Returns any unprocessed network input data.
QCA::TLSContext::setup
virtual void setup(bool serverMode, const QString &hostName, bool compress)=0
Configure a new session.
QCA::TLSContext::dtlsTimeout
void dtlsTimeout()
Emit this to force the application to call update(), even with empty arguments.
QCA::TLSContext::eof
virtual bool eof() const =0
Returns true if the peer has closed the stream.
QCA::TLSContext::TLSContext
TLSContext(Provider *p, const QString &type)
Standard constructor.
Definition qcaprovider.h:2306
QCA::TLSContext::shutdown
virtual void shutdown()=0
Sets the session to the shutdown state.
QCA::TLSSessionContext
TLS "session" provider.
Definition qcaprovider.h:2215
QCA::TLSSessionContext::TLSSessionContext
TLSSessionContext(Provider *p)
Standard constructor.
Definition qcaprovider.h:2223
QCA::TLS::Version
Version
Version of TLS or SSL.
Definition qca_securelayer.h:306
QList
QCA
QCA - the Qt Cryptographic Architecture.
Definition qca_basic.h:41
QCA::SecureMessageSignatureList
QList< SecureMessageSignature > SecureMessageSignatureList
A list of signatures.
Definition qca_securemessage.h:263
QCA::UsageMode
UsageMode
Specify the intended usage of a certificate.
Definition qca_cert.h:483
QCA::DLGroupSet
DLGroupSet
Well known discrete logarithm group sets.
Definition qca_publickey.h:135
QCA::CertificateRequestFormat
CertificateRequestFormat
Certificate Request Format.
Definition qca_cert.h:54
QCA::Constraints
QList< ConstraintType > Constraints
Certificate constraints type
Definition qca_cert.h:590
QCA::SecureMessageKeyList
QList< SecureMessageKey > SecureMessageKeyList
A list of message keys.
Definition qca_securemessage.h:175
QCA::Validity
Validity
The validity (or otherwise) of a certificate.
Definition qca_cert.h:497
QCA::EncryptionAlgorithm
EncryptionAlgorithm
Encryption algorithms.
Definition qca_publickey.h:55
QCA::PBEAlgorithm
PBEAlgorithm
Password-based encryption.
Definition qca_publickey.h:103
QCA::Direction
Direction
Direction settings for symmetric algorithms.
Definition qca_core.h:141
QCA::ValidateFlags
ValidateFlags
The conditions to validate for a certificate.
Definition qca_cert.h:517
QCA::ConvertResult
ConvertResult
Return value from a format conversion.
Definition qca_publickey.h:119
QCA::SignatureAlgorithm
SignatureAlgorithm
Signature algorithm variants.
Definition qca_publickey.h:74
QCA::SignatureFormat
SignatureFormat
Signature formats (DSA only).
Definition qca_publickey.h:93
qca_basic.h
Header file for classes for cryptographic primitives (basic operations).
qca_cert.h
Header file for PGP key and X.509 certificate related classes.
qca_core.h
Header file for core QCA infrastructure.
qca_keystore.h
Header file for classes that provide and manage keys.
qca_publickey.h
Header file for PublicKey and PrivateKey related classes.
qca_securelayer.h
Header file for SecureLayer and its subclasses.
qca_securemessage.h
Header file for secure message (PGP, CMS) classes.