diff options
Diffstat (limited to 'pica-client/accountswindow.cpp')
| -rw-r--r-- | pica-client/accountswindow.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pica-client/accountswindow.cpp b/pica-client/accountswindow.cpp index b38b5c0..4ad1c75 100644 --- a/pica-client/accountswindow.cpp +++ b/pica-client/accountswindow.cpp @@ -109,8 +109,17 @@ void AccountsWindow::login_click() void AccountsWindow::CreateAccount(QString CertFilename, QString PkeyFilename, bool copyfiles) { quint32 id; + int ret; - PICA_get_id_from_cert(CertFilename.toUtf8().constData(),&id); + ret = PICA_get_id_from_cert(CertFilename.toUtf8().constData(),&id); + + if (0 == id || 0 == ret) + { + QMessageBox mbx; + mbx.setText("Invalid certificate"); + mbx.exec(); + return; + } QString name = OpenSSLTool::NameFromCertFile(CertFilename); |
