Skip to content

Commit

Permalink
fix setting up encryption with software based certificate storage
Browse files Browse the repository at this point in the history
some data need to be converted to or from base64

some data should not be converted

clear one such place where a conversion to base64 was too much

Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Feb 4, 2025
1 parent 6163be1 commit 7dc79cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsync/clientsideencryption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ bool ClientSideEncryption::checkPublicKeyValidity(const AccountPtr &account) con
BIO_write(publicKeyBio, publicKeyPem.constData(), publicKeyPem.size());
auto publicKey = PKey::readPublicKey(publicKeyBio);

auto encryptedData = EncryptionHelper::encryptStringAsymmetric(account->e2e()->getCertificateInformation(), account->e2e()->paddingMode(), *account->e2e(), data.toBase64());
auto encryptedData = EncryptionHelper::encryptStringAsymmetric(account->e2e()->getCertificateInformation(), account->e2e()->paddingMode(), *account->e2e(), data);
if (!encryptedData) {
qCWarning(lcCse()) << "encryption error";
return false;
Expand Down

0 comments on commit 7dc79cd

Please sign in to comment.