Skip to content

Commit

Permalink
Merge pull request #3352 from nextcloud/bugfix/openssl-crash-when-no-…
Browse files Browse the repository at this point in the history
…e2ee-mnemonic

Bugfix. Crash when printing OpenSSL decryption errors with no e2ee mnemonic,
  • Loading branch information
allexzander authored Jun 1, 2021
2 parents 6b20092 + bf39f05 commit da586b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libsync/clientsideencryption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,8 +708,8 @@ QByteArray decryptStringAsymmetric(EVP_PKEY *privateKey, const QByteArray& data)
QByteArray out(outlen, '\0');

if (EVP_PKEY_decrypt(ctx, unsignedData(out), &outlen, (unsigned char *)data.constData(), data.size()) <= 0) {
qCInfo(lcCseDecryption()) << "Could not decrypt the data.";
ERR_print_errors_fp(stdout); // This line is not printing anything.
const auto error = handleErrors();
qCCritical(lcCseDecryption()) << "Could not decrypt the data." << error;
return {};
} else {
qCInfo(lcCseDecryption()) << "data decrypted successfully";
Expand Down

0 comments on commit da586b7

Please sign in to comment.