Close #37: XCA 2: EVP_DecryptFinal_ex:bad decrypt

This error occures when updating a legacy database not
protected by a password (empty password) and setting
a new password during update process.

When importing an old database with an empty password,
don't ask for a new one for the new database.
This commit is contained in:
Christian Hohnstaedt 2018-10-29 17:12:38 +01:00
parent f260c945ad
commit 73452bfa17

View File

@ -263,7 +263,7 @@ int MainWindow::init_database(QString dbName)
certView->setRootIsDecorated(db_x509::treeview);
ret = 1;
try {
if (pki_evp::passwd.isEmpty()) {
if (pki_evp::passwd.isEmpty() && oldDbFile.isEmpty()) {
ret = initPass(dbName);
if (ret == 2)
return ret;