#pragma once
+#include "core-export.h"
+
#include "identity.h"
#ifdef HAVE_SSL
// ========================================
#ifdef HAVE_SSL
class CoreIdentity;
-class CoreCertManager : public CertManager
+class CORE_EXPORT CoreCertManager : public CertManager
{
Q_OBJECT
public:
- CoreCertManager(CoreIdentity& identity);
+ CoreCertManager(CoreIdentity* identity);
# ifdef HAVE_SSL
const QSslKey& sslKey() const override;
void setId(IdentityId id);
private:
- CoreIdentity& identity;
+ CoreIdentity* _identity{nullptr};
};
#endif // HAVE_SSL
// =========================================
// CoreIdentity
// =========================================
-class CoreIdentity : public Identity
+class CORE_EXPORT CoreIdentity : public Identity
{
Q_OBJECT
void setSslCert(const QByteArray& encoded);
#endif /* HAVE_SSL */
- CoreIdentity& operator=(const CoreIdentity& identity);
-
private:
#ifdef HAVE_SSL
QSslKey _sslKey;
#ifdef HAVE_SSL
inline const QSslKey& CoreCertManager::sslKey() const
{
- return identity.sslKey();
+ return _identity->sslKey();
}
inline const QSslCertificate& CoreCertManager::sslCert() const
{
- return identity.sslCert();
+ return _identity->sslCert();
}
#endif