/***************************************************************************
- * Copyright (C) 2005-2013 by the Quassel Project *
+ * Copyright (C) 2005-2014 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
#include <QDropEvent>
#include <QFileDialog>
#include <QUrl>
+#include <QMessageBox>
#include "client.h"
#include "iconloader.h"
if (isCert) {
QSslCertificate cert = certByFilename(filename);
- if (cert.isValid())
+ if (!cert.isNull())
showCertState(cert);
}
else {
goto returnKey;
}
}
+ QMessageBox::information(this, tr("Failed to read key"), tr("Failed to read the key file. It is either incompatible or invalid. Note that the key file must not have a passphrase."));
returnKey:
return key;
}
for (int i = 0; i < 2; i++) {
cert = QSslCertificate(certRaw, (QSsl::EncodingFormat)i);
- if (cert.isValid())
+ if (!cert.isNull())
break;
}
return cert;
void IdentityEditWidget::showCertState(const QSslCertificate &cert)
{
- if (!cert.isValid()) {
+ if (cert.isNull()) {
ui.certOrgLabel->setText(tr("No Certificate loaded"));
ui.certCNameLabel->setText(tr("No Certificate loaded"));
ui.clearOrLoadCertButton->setText(tr("Load"));