I’m having a hard time determining where to submit bugs or find help using the QCA. I’m building on Windows using Mingw and I get a segfault at the line:
k->createPublic(n, e);
k->createPublic(n, e);
To copy to clipboard, switch view to plain text mode
in the method:
RSAPublicKey
::RSAPublicKey(const BigInteger
&n,
const BigInteger
&e,
const QString &provider
)
RSAPublicKey::RSAPublicKey(const BigInteger &n, const BigInteger &e, const QString &provider)
To copy to clipboard, switch view to plain text mode
All my unit tests pass but I don’t see a particular unit test for creating a public key directly from the modulus and exponent (one of the few examples I found online):
QString eee
("22640209");
//exp: got from server QString mmm
("95033496681677513042303794296510796923484007896833482880191206334940729008671");
QCA::BigInteger exp11(eee);
QCA::BigInteger mod11(mmm);
QCA::PublicKey *public_key;
public_key = new QCA::RSAPublicKey(mod11,exp11,"qca-ossl");
QString eee("22640209");//exp: got from server
QString mmm("95033496681677513042303794296510796923484007896833482880191206334940729008671");
QCA::BigInteger exp11(eee);
QCA::BigInteger mod11(mmm);
QCA::PublicKey *public_key;
public_key = new QCA::RSAPublicKey(mod11,exp11,"qca-ossl");
To copy to clipboard, switch view to plain text mode
What might I be doing wrong when building in windows? Is the provider not loading? If I run "qcatool2 plugins" I get
C:\workspace\qtcreator-build>qcatool2 plugins
Qt Library Paths:
C:/QtSDK/Desktop/Qt/4.7.2/mingw/plugins
C:/QtSDK/Desktop/Qt/4.7.2/mingw/bin
Available Providers:
qca-logger
qca-ossl
This product includes cryptographic software written by Eric Young
(eay@cryptsoft.com)
qca-softstore
Added after 4 minutes:
It's also worth mentioning that I have the code wrapped like so:
if (!QCA::isSupported("pkey", "qca-ossl") ||
!QCA::PKey::supportedTypes("qca-ossl").contains(QCA::PKey::RSA) ||
!QCA::PKey::supportedIOTypes("qca-ossl").contains(QCA::PKey::RSA)) {
qDebug() << "RSA not supported!";
} else {
QString eee
("22640209");
//exp: got from server QString mmm
("95033496681677513042303794296510796923484007896833482880191206334940729008671");
QCA::BigInteger exp11(eee);
QCA::BigInteger mod11(mmm);
QCA::PublicKey *public_key;
public_key = new QCA::RSAPublicKey(mod11,exp11,"qca-ossl");
}
if (!QCA::isSupported("pkey", "qca-ossl") ||
!QCA::PKey::supportedTypes("qca-ossl").contains(QCA::PKey::RSA) ||
!QCA::PKey::supportedIOTypes("qca-ossl").contains(QCA::PKey::RSA)) {
qDebug() << "RSA not supported!";
} else {
QString eee("22640209");//exp: got from server
QString mmm("95033496681677513042303794296510796923484007896833482880191206334940729008671");
QCA::BigInteger exp11(eee);
QCA::BigInteger mod11(mmm);
QCA::PublicKey *public_key;
public_key = new QCA::RSAPublicKey(mod11,exp11,"qca-ossl");
}
To copy to clipboard, switch view to plain text mode
And I do initialize the QCA in main.cpp.
Bookmarks