X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fclient%2Fclientidentity.cpp;h=dc6ebe5997307b87e4ea949dd6a5b747bd4a343f;hb=8582c2ad5708a1972c85bea1cf8d81ad3ece4814;hp=eb64a12ac5a306efe2bff6d2df44ff1a41eff11c;hpb=76db8cdfbeffaaba359c8e80cf2146da9e9e7f8a;p=quassel.git diff --git a/src/client/clientidentity.cpp b/src/client/clientidentity.cpp index eb64a12a..dc6ebe59 100644 --- a/src/client/clientidentity.cpp +++ b/src/client/clientidentity.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -23,23 +23,14 @@ #include "client.h" #include "signalproxy.h" -INIT_SYNCABLE_OBJECT(CertIdentity) CertIdentity::CertIdentity(IdentityId id, QObject *parent) : Identity(id, parent) -#ifdef HAVE_SSL - , _certManager(0), - _isDirty(false) -#endif { } CertIdentity::CertIdentity(const Identity &other, QObject *parent) : Identity(other, parent) -#ifdef HAVE_SSL - , _certManager(0), - _isDirty(false) -#endif { } @@ -47,10 +38,9 @@ CertIdentity::CertIdentity(const Identity &other, QObject *parent) CertIdentity::CertIdentity(const CertIdentity &other, QObject *parent) : Identity(other, parent) #ifdef HAVE_SSL - , _certManager(0), - _isDirty(other._isDirty), - _sslKey(other._sslKey), - _sslCert(other._sslCert) + , _isDirty(other._isDirty) + , _sslKey(other._sslKey) + , _sslCert(other._sslCert) #endif { } @@ -111,6 +101,8 @@ void CertIdentity::markClean() void ClientCertManager::setSslKey(const QByteArray &encoded) { QSslKey key(encoded, QSsl::Rsa); + if (key.isNull() && Client::isCoreFeatureEnabled(Quassel::Feature::EcdsaCertfpKeys)) + key = QSslKey(encoded, QSsl::Ec); if (key.isNull()) key = QSslKey(encoded, QSsl::Dsa); _certIdentity->setSslKey(key); @@ -122,5 +114,4 @@ void ClientCertManager::setSslCert(const QByteArray &encoded) _certIdentity->setSslCert(QSslCertificate(encoded)); } - #endif // HAVE_SSL