diff --git a/client/CDocSupport.cpp b/client/CDocSupport.cpp index 7b9c969c2..f85e806e7 100644 --- a/client/CDocSupport.cpp +++ b/client/CDocSupport.cpp @@ -344,6 +344,13 @@ DDNetworkBackend::fetchKey(std::vector &result, const std::string &url, e.exec(); if(reply->error() != QNetworkReply::NoError && reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() != 201) { + if (backend.get()->status != QCryptoBackend::PinOK) { + // The actual error was in QCryptoBackend + libcdoc::result_t lresult = getDecryptStatus(backend.get()->status); + last_error = getLastErrorStr(lresult); + return lresult; + } + // Probably network problem last_error = reply->errorString().toStdString(); return BACKEND_ERROR; } diff --git a/client/CryptoDoc.cpp b/client/CryptoDoc.cpp index a285cbaa9..0b2620f25 100644 --- a/client/CryptoDoc.cpp +++ b/client/CryptoDoc.cpp @@ -363,8 +363,11 @@ bool CryptoDoc::decrypt(const libcdoc::Lock *lock, const QByteArray& secret) case DDCryptoBackend::IN_PROGRESS: str = QCryptoBackend::errorString(QCryptoBackend::Status::InProgress); break; + case DDCryptoBackend::BACKEND_ERROR: + str = QCryptoBackend::errorString(QCryptoBackend::Status::GeneralError); + break; default: - str = tr("Please check your internet connection and network settings."); + str = tr("General decryption error. Neither the card reader not network layer did not give more information. Please check your internet connection, network settings and card reader. On some readers it may also indicate the wrong pin code or locked card."); break; } WarningDialog::create() diff --git a/client/QCryptoBackend.cpp b/client/QCryptoBackend.cpp index 4c7640fe8..1210b4564 100644 --- a/client/QCryptoBackend.cpp +++ b/client/QCryptoBackend.cpp @@ -91,9 +91,9 @@ QString QCryptoBackend::errorString(Status error) case PinCanceled: return QCoreApplication::translate("QCryptoBackend", "PIN entry canceled"); case PinLocked: return QCoreApplication::translate("QCryptoBackend", "PIN locked"); case PinIncorrect: return QCoreApplication::translate("QCryptoBackend", "PIN incorrect"); - case InProgress: return QCoreApplication::translate("QCryptoBackend", "Signing/decrypting is already in progress another window."); - case GeneralError: return QCoreApplication::translate("QCryptoBackend", "PKCS11 general error"); - case DeviceError: return QCoreApplication::translate("QCryptoBackend", "PKCS11 device error"); + case InProgress: return QCoreApplication::translate("QCryptoBackend", "Signing/decrypting is already in progress in another window."); + case GeneralError: return QCoreApplication::translate("QCryptoBackend", "Error in smart card driver, reader or the card. On some readers it may indicate the wrong pin code or locked card."); + case DeviceError: return QCoreApplication::translate("QCryptoBackend", "Error in smart card driver, reader or the card. On some readers it may indicate the wrong pin code or locked card."); default: return QCoreApplication::translate("QCryptoBackend", "Unknown error"); } } diff --git a/client/translations/en.ts b/client/translations/en.ts index 2a74ebd60..1797745ce 100644 --- a/client/translations/en.ts +++ b/client/translations/en.ts @@ -499,11 +499,11 @@ You are about to delete the last file in the container - You are about to delete the last file in the container + You are about to delete the last file in the container It is removed along with the container. - It is removed along with the container. + It is removed along with the container. In order to view Validity Confirmation Sheet there has to be at least one printer installed! @@ -610,7 +610,7 @@ Key transfer server is not configured - + Key transfer server is not configured Failed to remove key @@ -636,6 +636,10 @@ Cannot read file. Cannot read file. + + General decryption error. Neither the card reader not network layer did not give more information. Please check your internet connection, network settings and card reader. On some readers it may also indicate the wrong pin code or locked card. + General decryption error. Neither the card reader not network layer did not give more information. Please check your internet connection, network settings and card reader. On some readers it may also indicate the wrong pin code or locked card. + Diagnostics @@ -2166,15 +2170,15 @@ ID-Card Signing/decrypting is already in progress another window. - Signing/decrypting is already in progress another window. + Signing/decrypting is already in progress another window. PKCS11 general error - PKCS11 general error + PKCS11 general error PKCS11 device error - PKCS11 device error + PKCS11 device error Unknown error @@ -2188,6 +2192,14 @@ ID-Card PIN entry canceled PIN entry canceled + + Signing/decrypting is already in progress in another window. + Signing/decrypting is already in progress in another window. + + + Error in smart card driver, reader or the card. On some readers it may indicate the wrong pin code or locked card. + Error in smart card driver, reader or the card. On some readers it may indicate the wrong pin code or locked card. + QFileDialog @@ -3083,6 +3095,14 @@ Additional licenses and components Remove Remove + + You are about to delete the last file in the container + You are about to delete the last file in the container + + + It is removed along with the container. + It is removed along with the container. + WarningItem diff --git a/client/translations/et.ts b/client/translations/et.ts index 24e461bfd..339776cca 100644 --- a/client/translations/et.ts +++ b/client/translations/et.ts @@ -499,11 +499,11 @@ You are about to delete the last file in the container - Oled kustutamas viimast faili ümbrikus + Oled kustutamas viimast faili ümbrikus It is removed along with the container. - Koos sellega eemaldatakse ka ümbrik. + Koos sellega eemaldatakse ka ümbrik. In order to view Validity Confirmation Sheet there has to be at least one printer installed! @@ -636,6 +636,10 @@ Cannot read file. Faili ei saa lugeda. + + General decryption error. Neither the card reader not network layer did not give more information. Please check your internet connection, network settings and card reader. On some readers it may also indicate the wrong pin code or locked card. + Täpsustamata dekrüpteerimise viga. Ei kaardilugeja ega võrguühendus ei andnud täpsemat informatsiooni. Kontrollige internetiühendust, võrgu sätteid ja kaardilugejat. Mõne lugeja korral võib põhjuseks olla ka vale pin või lukustatud kaart. + Diagnostics @@ -2166,15 +2170,15 @@ ID-kaardiga Signing/decrypting is already in progress another window. - Allkirjastamine/dekrüpteerimine on juba käimas teises aknas. + Allkirjastamine/dekrüpteerimine on juba käimas teises aknas. PKCS11 general error - PKCS11 üldine viga + PKCS11 üldine viga PKCS11 device error - PKCS11 seadme viga + PKCS11 seadme viga Unknown error @@ -2188,6 +2192,14 @@ ID-kaardiga PIN entry canceled PIN sisestus katkestatus + + Signing/decrypting is already in progress in another window. + Allkirjastamine/dekrüpteerimine juba toimub teises aknas. + + + Error in smart card driver, reader or the card. On some readers it may indicate the wrong pin code or locked card. + Viga kiipkaardi draiveris, lugejas või kaardis. Osade draiverite korral võib see tähendada ka lihtsalt vale PIN-i või lukus kaarti. + QFileDialog @@ -3083,6 +3095,14 @@ Täiendavad litsentsid ja komponendid Remove Eemalda + + You are about to delete the last file in the container + Oled kustutamas viimast faili ümbrikus + + + It is removed along with the container. + Koos sellega eemaldatakse ka ümbrik. + WarningItem