Skip to content

Commit 17457f9

Browse files
committed
New client, crashing old clients fixed!
1 parent 004ef8b commit 17457f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sources/crypto.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ QByteArray lmCrypto::generateRSA() {
5555
EVP_PKEY_CTX_free(ctx);
5656

5757
BIO* bio = BIO_new(BIO_s_mem());
58-
if (PEM_write_bio_PUBKEY(bio, pKey)) {
58+
// Use RSAPublicKey for compatibility with older clients
59+
if (PEM_write_bio_RSAPublicKey(bio, EVP_PKEY_get0_RSA(pKey))) {
5960
publicKey.resize(BIO_pending(bio));
6061
BIO_read(bio, publicKey.data(), publicKey.size());
6162
}

0 commit comments

Comments
 (0)