X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fclientidentity.cpp;h=16e1c424676cb69fbf47e4bd9f3e57b3a842d566;hp=0879e9b335180c572feceb0c7faf562257bc71c9;hb=e8a39b4c3c92e193ab861a3fea84a261bb6fbd24;hpb=0a43227b8cd44625f4881cc1545d42c8c8a4876c diff --git a/src/client/clientidentity.cpp b/src/client/clientidentity.cpp index 0879e9b3..16e1c424 100644 --- a/src/client/clientidentity.cpp +++ b/src/client/clientidentity.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 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,11 +23,10 @@ #include "client.h" #include "signalproxy.h" -INIT_SYNCABLE_OBJECT(CertIdentity) CertIdentity::CertIdentity(IdentityId id, QObject *parent) : Identity(id, parent) #ifdef HAVE_SSL - , _certManager(0), + , _certManager(nullptr), _isDirty(false) #endif { @@ -37,7 +36,7 @@ CertIdentity::CertIdentity(IdentityId id, QObject *parent) CertIdentity::CertIdentity(const Identity &other, QObject *parent) : Identity(other, parent) #ifdef HAVE_SSL - , _certManager(0), + , _certManager(nullptr), _isDirty(false) #endif { @@ -47,7 +46,7 @@ CertIdentity::CertIdentity(const Identity &other, QObject *parent) CertIdentity::CertIdentity(const CertIdentity &other, QObject *parent) : Identity(other, parent) #ifdef HAVE_SSL - , _certManager(0), + , _certManager(nullptr), _isDirty(other._isDirty), _sslKey(other._sslKey), _sslCert(other._sslCert) @@ -111,6 +110,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 +123,4 @@ void ClientCertManager::setSslCert(const QByteArray &encoded) _certIdentity->setSslCert(QSslCertificate(encoded)); } - #endif // HAVE_SSL