diff --git a/TODO b/TODO index a2377e4e..db542e91 100644 --- a/TODO +++ b/TODO @@ -4,7 +4,6 @@ problem: pgp can cause token event while pgp store is available deinit method for providers, to occur for all before destruction? it's possible we use SecureArray in some unnecessary places - Q_DISABLE_COPY on some objects give all classes non-default ctors/dtors/copy/op=, and dpointers? add more "getters" to the library? don't forget to QCA_EXPORT everything @@ -15,6 +14,7 @@ keystore: complete securelayer: complete other: + remove header file indentation for parallel make, have all utilities/tests depend on the library finish cmssigner, set to 1.0 cmssigner: i'm getting a crash sometimes during sign.. test and trace diff --git a/include/QtCrypto/qca_cert.h b/include/QtCrypto/qca_cert.h index 8d72ebd1..bf993534 100644 --- a/include/QtCrypto/qca_cert.h +++ b/include/QtCrypto/qca_cert.h @@ -2060,6 +2060,8 @@ namespace QCA void finished(); private: + Q_DISABLE_COPY(KeyLoader) + class Private; friend class Private; Private *d; diff --git a/include/QtCrypto/qca_core.h b/include/QtCrypto/qca_core.h index cec5e05e..22589f4c 100644 --- a/include/QtCrypto/qca_core.h +++ b/include/QtCrypto/qca_core.h @@ -739,15 +739,6 @@ namespace QCA { Q_OBJECT public: - /** - Standard constructor - - \param parent the parent provider for this - context - \param type the name of the provider context type - */ - Context(Provider *parent, const QString &type); - Context(const Context &from); virtual ~Context(); /** @@ -775,7 +766,23 @@ namespace QCA */ bool sameProvider(const Context *c) const; + protected: + /** + Standard constructor + + \param parent the parent provider for this + context + \param type the name of the provider context type + */ + Context(Provider *parent, const QString &type); + + // copy constructor + Context(const Context &from); + private: + // disable assignment + Context & operator=(const Context &from); + Provider *_provider; QString _type; }; @@ -784,9 +791,15 @@ namespace QCA { Q_OBJECT public: + ~BasicContext(); + + protected: BasicContext(Provider *parent, const QString &type); BasicContext(const BasicContext &from); - ~BasicContext(); + + private: + // disable assignment + BasicContext & operator=(const BasicContext &from); }; /** @@ -1325,6 +1338,8 @@ namespace QCA void eventReady(int id, const QCA::Event &context); private: + Q_DISABLE_COPY(EventHandler) + class Private; friend class Private; Private *d; @@ -1406,6 +1421,8 @@ namespace QCA void responseReady(); private: + Q_DISABLE_COPY(PasswordAsker) + class Private; friend class Private; Private *d; @@ -1467,6 +1484,8 @@ namespace QCA void responseReady(); private: + Q_DISABLE_COPY(TokenAsker) + class Private; friend class Private; Private *d; diff --git a/include/QtCrypto/qca_keystore.h b/include/QtCrypto/qca_keystore.h index 52567155..8b932480 100644 --- a/include/QtCrypto/qca_keystore.h +++ b/include/QtCrypto/qca_keystore.h @@ -329,6 +329,8 @@ namespace QCA void unavailable(); private: + Q_DISABLE_COPY(KeyStoreEntryWatcher) + class Private; friend class Private; Private *d; @@ -509,6 +511,8 @@ namespace QCA void entryRemoved(bool success); private: + Q_DISABLE_COPY(KeyStore) + friend class KeyStorePrivate; KeyStorePrivate *d; @@ -622,6 +626,8 @@ namespace QCA void keyStoreAvailable(const QString &id); private: + Q_DISABLE_COPY(KeyStoreManager) + friend class KeyStoreManagerPrivate; KeyStoreManagerPrivate *d; diff --git a/include/QtCrypto/qca_publickey.h b/include/QtCrypto/qca_publickey.h index 801a15af..2534a50f 100644 --- a/include/QtCrypto/qca_publickey.h +++ b/include/QtCrypto/qca_publickey.h @@ -1022,6 +1022,8 @@ namespace QCA void finished(); private: + Q_DISABLE_COPY(KeyGenerator) + class Private; friend class Private; Private *d; diff --git a/include/QtCrypto/qca_securelayer.h b/include/QtCrypto/qca_securelayer.h index 3b8985fe..3e4f2258 100644 --- a/include/QtCrypto/qca_securelayer.h +++ b/include/QtCrypto/qca_securelayer.h @@ -206,6 +206,9 @@ namespace QCA can determine the error type using errorCode(). */ void error(); + + private: + Q_DISABLE_COPY(SecureLayer) }; /** @@ -616,6 +619,8 @@ namespace QCA void handshaken(); private: + Q_DISABLE_COPY(TLS) + class Private; friend class Private; Private *d; @@ -984,6 +989,8 @@ namespace QCA void authenticated(); private: + Q_DISABLE_COPY(SASL) + class Private; friend class Private; Private *d; diff --git a/include/QtCrypto/qca_securemessage.h b/include/QtCrypto/qca_securemessage.h index f918d81b..de0033df 100644 --- a/include/QtCrypto/qca_securemessage.h +++ b/include/QtCrypto/qca_securemessage.h @@ -702,6 +702,8 @@ else void finished(); private: + Q_DISABLE_COPY(SecureMessage) + class Private; friend class Private; Private *d; @@ -736,6 +738,9 @@ else provider is required. */ SecureMessageSystem(QObject *parent, const QString &type, const QString &provider); + + private: + Q_DISABLE_COPY(SecureMessageSystem) }; /** @@ -759,6 +764,9 @@ else */ explicit OpenPGP(QObject *parent = 0, const QString &provider = QString()); ~OpenPGP(); + + private: + Q_DISABLE_COPY(OpenPGP) }; /** @@ -830,6 +838,9 @@ else \param keys the collection of keys to use */ void setPrivateKeys(const SecureMessageKeyList &keys); + + private: + Q_DISABLE_COPY(CMS) }; } diff --git a/include/QtCrypto/qca_support.h b/include/QtCrypto/qca_support.h index bb3f0013..f74952ae 100644 --- a/include/QtCrypto/qca_support.h +++ b/include/QtCrypto/qca_support.h @@ -71,6 +71,8 @@ namespace QCA virtual void run(); private: + Q_DISABLE_COPY(SyncThread) + class Private; friend class Private; Private *d; @@ -87,6 +89,8 @@ namespace QCA void conditionMet(); private: + Q_DISABLE_COPY(Synchronizer) + class Private; Private *d; }; @@ -105,6 +109,8 @@ namespace QCA void changed(); private: + Q_DISABLE_COPY(DirWatch) + class Private; friend class Private; Private *d; @@ -150,6 +156,8 @@ namespace QCA void changed(); private: + Q_DISABLE_COPY(FileWatch) + class Private; friend class Private; Private *d; @@ -239,6 +247,8 @@ namespace QCA QByteArray bytesLeftToWrite(); private: + Q_DISABLE_COPY(Console) + friend class ConsolePrivate; ConsolePrivate *d; @@ -283,6 +293,8 @@ namespace QCA void outputClosed(); private: + Q_DISABLE_COPY(ConsoleReference) + friend class ConsoleReferencePrivate; ConsoleReferencePrivate *d; @@ -306,6 +318,8 @@ namespace QCA void finished(); private: + Q_DISABLE_COPY(ConsolePrompt) + class Private; friend class Private; Private *d; @@ -410,6 +424,8 @@ namespace QCA QStringList currentLogDevices() const; private: + Q_DISABLE_COPY(Logger) + friend class Global; /** @@ -466,13 +482,13 @@ namespace QCA virtual ~AbstractLogDevice() = 0; private: + Q_DISABLE_COPY(AbstractLogDevice) + class Private; Private *d; QString m_name; }; - - } #endif