Qt Cryptographic Architecture (QCA) bugs
Kjell Rune Skaaraas
kjella79 at yahoo.no
Tue Aug 12 00:41:46 BST 2008
Hello,I'm looking to come in contact with someone regarding the Qt Cryptographic Architecture library in KDE. I couldn't find any "Contact us" on either of the websites:http://api.kde.org/kdesupport-api/kdesupport-apidocs/qca/html/http://delta.affinix.com/qca/There seems to be two different issues related to the CertificateAuthority class in the latest 2.0.1 version. First, there is a function "createCertificate" in the header and documentation that is not in the source and causes linker error if you try to use it. However, I am also unable to use the "signRequest" function to successfully sign a certificate. I have made a simple test case and since it's basicly one file I'll quote it here.#include <QtCrypto>
#include <QtDebug>
TestCaSigning::TestCaSigning()
{
QCA::Initializer init;
QCA::PrivateKey caKey = QCA::KeyGenerator().createRSA( 512 );
QCA::CertificateOptions caOpts;
caOpts.setAsCA();
caOpts.setValidityPeriod( QDateTime( QDate(2008, 1, 1) ), QDateTime( QDate(2008, 12, 31) ) );
QCA::Certificate caCert = QCA::Certificate( caOpts, caKey );
QCA::CertificateAuthority ca( caCert, caKey, QString() );
QCA::PrivateKey testKey = QCA::KeyGenerator().createRSA( 512 );
QCA::CertificateOptions testOpts;
testOpts.setValidityPeriod( QDateTime( QDate(2008, 1, 1) ), QDateTime( QDate(2008, 12, 31) ) );
QCA::CertificateRequest testReq = QCA::CertificateRequest( testOpts, testKey );
QCA::Certificate testCert = ca.signRequest( testReq, QDateTime( QDate( 2008, 12, 31 ) ) );
qDebug() << __FUNCTION__ << testCert.isSelfSigned() << testCert.subjectKeyId().toHex() << testCert.issuerKeyId().toHex();
// Leads to linker error:
//ca.createCertificate( testReq.subjectPublicKey(), testOpts );
}
The result of this is that I get a self-signed certificate?! Either getting a null certificate (something went wrong) or a signed certificate would be fine, but the result does not make any sense to me. Hopefully one of you can help me or at least point me to whom I should be asking/reporting this to.
Regards,Kjell Rune Skaaraas
_________________________________________________________
Alt i ett. Få Yahoo! Mail med adressekartotek, kalender og
notisblokk. http://no.mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080811/cfb28ca2/attachment.htm>
More information about the kde-core-devel
mailing list