SSH Agent: Fix invalid iqmp output for RSA keys

This fixes loading RSA keys to Pageant.
This commit is contained in:
Toni Spets authored and Jonathan White committed 2018-06-26 22:52:47 -04:00
1 parent 9805f2331d
commit 8c70856a82
3 files changed
+87 -3

No files matched your search

+3 -3
View File
@@ -102,14 +102,14 @@ namespace {
mpi_invm(u, q, p);
iqmp_hex.resize((bap.length() + 1) * 2);
gcry_mpi_print(GCRYMPI_FMT_HEX, reinterpret_cast<unsigned char*>(iqmp_hex.data()), iqmp_hex.length(), nullptr, u);
iqmp_hex.resize(bap.length() * 2);
gcry_mpi_print(GCRYMPI_FMT_HEX, reinterpret_cast<unsigned char*>(iqmp_hex.data()), iqmp_hex.size(), nullptr, u);
gcry_mpi_release(u);
gcry_mpi_release(p);
gcry_mpi_release(q);
return QByteArray::fromHex(iqmp_hex);
return QByteArray::fromHex(QString(iqmp_hex).toLatin1());
}
}