4
0
mirror of https://github.com/QuasarApp/qca.git synced 2025-05-08 00:39:33 +00:00

add more QCA_EXPORT

svn path=/trunk/kdesupport/qca/; revision=428729
This commit is contained in:
Justin Karneges 2005-06-25 02:48:53 +00:00
parent 13b370fe91
commit 9b918f5de9
6 changed files with 47 additions and 56 deletions

4
TODO

@ -19,6 +19,7 @@
standardize on count() vs size() when iterating?
add more "getters" to the library?
give all classes non-default ctors/dtors/copy/op=, and dpointers?
printf + latin1()/toLatin1() -> qPrintable() ? (in code, examples, docs, etc)
* for tech preview
plugins:
@ -27,9 +28,10 @@
api:
ensure PGPKey and SASL are proper
other:
QCA_EXPORT
fix the windows build
* finish code for APIs:
securearray: operator+, operator+= (i think bytearray has these)
"untrusted" error for SecureMessage
waitFor() should just spin the event loop?
if KeyStore::needPassphrase has no listener, submit a blank passphrase

@ -903,7 +903,7 @@ namespace QCA
\sa QCA::CertificateChain for a representation of a chain of Certificates related by
signatures.
*/
class CertificateCollection
class QCA_EXPORT CertificateCollection
{
public:
/**

@ -56,25 +56,6 @@ namespace QCA
*/
typedef QList<Provider*> ProviderList;
/**
* Convenience representation for iterator for the plugin providers
*
* You would use this something like the following:
* \code
* QCA::ProviderList qcaProviders = QCA::providers();
* QCA::ProviderListIterator it( qcaProviders );
* QCA::Provider *provider;
* while ( 0 != (provider = it.current() ) ) {
* ++it;
* cout << provider->name();
* }
* \endcode
*
* \sa ProviderList
* \sa providers()
*/
//typedef QPtrListIterator<Provider> ProviderListIterator;
/**
* Mode settings for memory allocation
*

@ -115,7 +115,7 @@ namespace QCA
/**
A discrete logarithm group
*/
class DLGroup
class QCA_EXPORT DLGroup
{
public:
DLGroup();

@ -36,7 +36,7 @@ namespace QCA
/**
Key for SecureMessage system
*/
class SecureMessageKey
class QCA_EXPORT SecureMessageKey
{
public:
/**
@ -149,7 +149,7 @@ namespace QCA
/**
SecureMessage signature
*/
class SecureMessageSignature
class QCA_EXPORT SecureMessageSignature
{
public:
/**
@ -219,7 +219,7 @@ namespace QCA
*/
typedef QList<SecureMessageSignature> SecureMessageSignatureList;
class SecureMessage : public QObject, public Algorithm
class QCA_EXPORT SecureMessage : public QObject, public Algorithm
{
Q_OBJECT
public:
@ -313,7 +313,7 @@ namespace QCA
Private *d;
};
class SecureMessageSystem : public QObject, public Algorithm
class QCA_EXPORT SecureMessageSystem : public QObject, public Algorithm
{
Q_OBJECT
public:
@ -323,7 +323,7 @@ namespace QCA
SecureMessageSystem(QObject *parent, const QString &type, const QString &provider);
};
class OpenPGP : public SecureMessageSystem
class QCA_EXPORT OpenPGP : public SecureMessageSystem
{
Q_OBJECT
public:
@ -331,7 +331,7 @@ namespace QCA
~OpenPGP();
};
class CMS : public SecureMessageSystem
class QCA_EXPORT CMS : public SecureMessageSystem
{
Q_OBJECT
public:

@ -53,7 +53,7 @@ whatsoever, or to specify the default provider directly (this goes for the
algorithm constructors as well as setGlobalRNG()).
*/
class QCAPlugin : public QObject
class QCA_EXPORT QCAPlugin : public QObject
{
Q_OBJECT
public:
@ -63,14 +63,14 @@ public:
namespace QCA {
class RandomContext : public Provider::Context
class QCA_EXPORT RandomContext : public Provider::Context
{
public:
RandomContext(Provider *p) : Provider::Context(p, "random") {}
virtual QSecureArray nextBytes(int size, Random::Quality q) = 0;
};
class HashContext : public Provider::Context
class QCA_EXPORT HashContext : public Provider::Context
{
public:
HashContext(Provider *p, const QString &type) : Provider::Context(p, type) {}
@ -79,7 +79,7 @@ public:
virtual QSecureArray final() = 0;
};
class CipherContext : public Provider::Context
class QCA_EXPORT CipherContext : public Provider::Context
{
public:
//enum Mode { CBC, CFB, ECB };
@ -92,7 +92,7 @@ public:
virtual bool final(QSecureArray *out) = 0;
};
class MACContext : public Provider::Context
class QCA_EXPORT MACContext : public Provider::Context
{
public:
MACContext(Provider *p, const QString &type) : Provider::Context(p, type) {}
@ -112,14 +112,14 @@ protected:
}
};
class KDFContext : public Provider::Context
class QCA_EXPORT KDFContext : public Provider::Context
{
public:
KDFContext(Provider *p, const QString &type) : Provider::Context(p, type) {}
virtual SymmetricKey makeKey(const QSecureArray &secret, const InitializationVector &salt, unsigned int keyLength, unsigned int iterationCount) = 0;
};
class DLGroupContext : public QObject, public Provider::Context
class QCA_EXPORT DLGroupContext : public QObject, public Provider::Context
{
Q_OBJECT
public:
@ -133,7 +133,7 @@ signals:
void finished();
};
class PKeyBase : public QObject, public Provider::Context
class QCA_EXPORT PKeyBase : public QObject, public Provider::Context
{
Q_OBJECT
public:
@ -164,7 +164,7 @@ signals:
void finished();
};
class RSAContext : public PKeyBase
class QCA_EXPORT RSAContext : public PKeyBase
{
Q_OBJECT
public:
@ -179,7 +179,7 @@ public:
virtual QBigInteger d() const = 0;
};
class DSAContext : public PKeyBase
class QCA_EXPORT DSAContext : public PKeyBase
{
Q_OBJECT
public:
@ -192,7 +192,7 @@ public:
virtual QBigInteger x() const = 0;
};
class DHContext : public PKeyBase
class QCA_EXPORT DHContext : public PKeyBase
{
Q_OBJECT
public:
@ -205,7 +205,7 @@ public:
virtual QBigInteger x() const = 0;
};
class PKeyContext : public Provider::Context
class QCA_EXPORT PKeyContext : public Provider::Context
{
public:
PKeyContext(Provider *p) : Provider::Context(p, "pkey") {}
@ -230,7 +230,7 @@ public:
virtual ConvertResult privateFromPEM(const QString &s, const QSecureArray &passphrase) = 0;
};
class CertBase : public Provider::Context
class QCA_EXPORT CertBase : public Provider::Context
{
public:
CertBase(Provider *p, const QString &type) : Provider::Context(p, type) {}
@ -242,7 +242,7 @@ public:
virtual ConvertResult fromPEM(const QString &s) = 0;
};
class CertContextProps
class QCA_EXPORT CertContextProps
{
public:
int version; // cert only
@ -262,7 +262,7 @@ public:
CertificateRequestFormat format; // csr only
};
class CRLContextProps
class QCA_EXPORT CRLContextProps
{
public:
CertificateInfo issuer;
@ -276,7 +276,7 @@ public:
class CRLContext;
class CertContext : public CertBase
class QCA_EXPORT CertContext : public CertBase
{
public:
CertContext(Provider *p) : CertBase(p, "cert") {}
@ -289,7 +289,7 @@ public:
virtual Validity validate(const QList<CertContext*> &trusted, const QList<CertContext*> &untrusted, const QList<CRLContext *> &crls, UsageMode u) const = 0;
};
class CSRContext : public CertBase
class QCA_EXPORT CSRContext : public CertBase
{
public:
CSRContext(Provider *p) : CertBase(p, "csr") {}
@ -302,7 +302,7 @@ public:
virtual ConvertResult fromSPKAC(const QString &s) = 0;
};
class CRLContext : public CertBase
class QCA_EXPORT CRLContext : public CertBase
{
public:
CRLContext(Provider *p) : CertBase(p, "crl") {}
@ -310,7 +310,7 @@ public:
virtual const CRLContextProps *props() const = 0;
};
class CertCollectionContext : public Provider::Context
class QCA_EXPORT CertCollectionContext : public Provider::Context
{
public:
CertCollectionContext(Provider *p) : Provider::Context(p, "certcollection") {}
@ -322,7 +322,7 @@ public:
virtual ConvertResult fromPKCS7(const QByteArray &a, QList<CertContext*> *certs, QList<CRLContext*> *crls) const = 0;
};
class CAContext : public Provider::Context
class QCA_EXPORT CAContext : public Provider::Context
{
public:
CAContext(Provider *p) : Provider::Context(p, "ca") {}
@ -337,7 +337,7 @@ public:
virtual CRLContext *updateCRL(const CRLContext &crl, const QList<CRLEntry> &entries, const QDateTime &nextUpdate) const = 0;
};
class PIXContext : public Provider::Context
class QCA_EXPORT PIXContext : public Provider::Context
{
public:
PIXContext(Provider *p) : Provider::Context(p, "pix") {}
@ -348,7 +348,15 @@ public:
virtual ConvertResult fromPKCS12(const QByteArray &in, const QSecureArray &passphrase, QString *name, QList<CertContext*> *chain, PKeyContext **priv) const = 0;
};
class KeyStoreEntryContext : public Provider::Context
class QCA_EXPORT PGPKeyContext : public Provider::Context
{
public:
PGPKeyContext(Provider *p) : Provider::Context(p, "pgpkey") {}
// TODO
};
class QCA_EXPORT KeyStoreEntryContext : public Provider::Context
{
public:
KeyStoreEntryContext(Provider *p) : Provider::Context(p, "keystoreentry") {}
@ -364,7 +372,7 @@ public:
virtual PGPKey pgpPublicKey() const;
};
class KeyStoreContext : public QObject, public Provider::Context
class QCA_EXPORT KeyStoreContext : public QObject, public Provider::Context
{
Q_OBJECT
public:
@ -394,7 +402,7 @@ signals:
void needPassphrase();
};
class KeyStoreListContext : public QObject, public Provider::Context
class QCA_EXPORT KeyStoreListContext : public QObject, public Provider::Context
{
Q_OBJECT
public:
@ -406,7 +414,7 @@ signals:
void updated(KeyStoreListContext *sender);
};
class TLSContext : public Provider::Context
class QCA_EXPORT TLSContext : public Provider::Context
{
public:
class SessionInfo
@ -452,7 +460,7 @@ public:
virtual CertificateChain peerCertificateChain() const = 0;
};
class SASLContext : public Provider::Context
class QCA_EXPORT SASLContext : public Provider::Context
{
public:
class HostPort
@ -527,7 +535,7 @@ public:
virtual bool decode(const QByteArray &in, QByteArray *out) = 0;
};
class MessageContext : public QObject, public Provider::Context
class QCA_EXPORT MessageContext : public QObject, public Provider::Context
{
Q_OBJECT
public:
@ -569,7 +577,7 @@ signals:
void updated();
};
class SMSContext : public Provider::Context
class QCA_EXPORT SMSContext : public Provider::Context
{
public:
SMSContext(Provider *p, const QString &type) : Provider::Context(p, type) {}