Skip to content
Snippets Groups Projects
Commit d236417e authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee
Browse files

Add missing licence

And fix a nullptr dereference introduced by the last commit
parent 0bb2fe44
Branches
No related tags found
No related merge requests found
/****************************************************************************
* Copyright (C) 2015 by Savoir-Faire Linux *
* Author : Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
#ifndef SECURITY_FLAW_H
#define SECURITY_FLAW_H
......
......@@ -181,7 +181,7 @@ void SecurityValidationModelPrivate::update()
/* The user certificate need to have a private key, otherwise it wont
* be possible to encrypt anything */
if (( m_pAccount->tlsCertificate()->hasPrivateKey() == Certificate::CheckValues::FAILED) && (m_pAccount->tlsPrivateKeyCertificate()->exist() == Certificate::CheckValues::FAILED)) {
if (( m_pAccount->tlsCertificate() && m_pAccount->tlsCertificate()->hasPrivateKey() == Certificate::CheckValues::FAILED) && (m_pAccount->tlsPrivateKeyCertificate() && m_pAccount->tlsPrivateKeyCertificate()->exist() == Certificate::CheckValues::FAILED)) {
m_lCurrentFlaws << _F(PRIVATE_KEY_MISSING,m_pAccount->tlsPrivateKeyCertificate()->type());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment