mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-30 19:37:15 -05:00
Do some basic self-checks when initializing the crypto backend.
This commit is contained in:
parent
b417bf9187
commit
0d6117bf4c
23 changed files with 143 additions and 27 deletions
10
src/main.cpp
10
src/main.cpp
|
|
@ -25,6 +25,7 @@
|
|||
#include "crypto/Crypto.h"
|
||||
#include "gui/Application.h"
|
||||
#include "gui/MainWindow.h"
|
||||
#include "gui/MessageBox.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
|
@ -38,7 +39,14 @@ int main(int argc, char** argv)
|
|||
// don't set organizationName as that changes the return value of
|
||||
// QDesktopServices::storageLocation(QDesktopServices::DataLocation)
|
||||
|
||||
Crypto::init();
|
||||
if (!Crypto::init()) {
|
||||
QString error = QCoreApplication::translate("Main",
|
||||
"Fatal error while testing the cryptographic functions.");
|
||||
error.append("\n");
|
||||
error.append(Crypto::errorString());
|
||||
MessageBox::critical(Q_NULLPTR, QCoreApplication::translate("Main", "KeePassX - Error"), error);
|
||||
return 1;
|
||||
}
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription(QCoreApplication::translate("main", "KeePassX - cross-platform password manager"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue