address review comments from @allexzander
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 5 Oct 2022 09:20:02 +0000 (11:20 +0200)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Mon, 24 Oct 2022 08:25:41 +0000 (10:25 +0200)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/clientsideencryption.cpp

index 29b56c4b81cedcb6d3254f3f0430bf4adcba5df2..fd1f501a248ded6e8d85c54e1eb6ec1cbfb24787 100644 (file)
@@ -1190,11 +1190,6 @@ void ClientSideEncryption::generateCSR(const AccountPtr &account, PKey keyPair)
             _certificate = QSslCertificate(cert.toLocal8Bit(), QSsl::Pem);
             _publicKey = _certificate.publicKey();
 
-            const auto publicKeyString = cert.toLocal8Bit();
-            Bio serverPublicKeyBio;
-            BIO_write(serverPublicKeyBio, publicKeyString.constData(), publicKeyString.size());
-            const auto serverPublicKey = PKey::readPrivateKey(serverPublicKeyBio);
-
             Bio certificateBio;
             const auto certificatePem = _certificate.toPem();
             BIO_write(certificateBio, certificatePem.constData(), certificatePem.size());