[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Qt Cryptographic Architecture (QCA) bugs
From: Kjell Rune Skaaraas <kjella79 () yahoo ! no>
Date: 2008-08-11 23:41:46
Message-ID: 863586.7114.qm () web27103 ! mail ! ukl ! yahoo ! com
[Download RAW message or body]
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
[Attachment #3 (text/html)]
<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: \
inherit;"><P>Hello,</P><P></P><P>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:</P><P></P><P>http://api.kde.org/kdesupport-api/kdesupport-apidocs/qca/html/</P><P>http://delta.affinix.com/qca/</P><P></P><P>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.</P><P></P><P>#include <QtCrypto><BR>#include \
<QtDebug><BR><BR>TestCaSigning::TestCaSigning()<BR>{<BR> QCA::Initializer \
init;<BR> QCA::PrivateKey caKey = QCA::KeyGenerator().createRSA( 512 );<BR> \
QCA::CertificateOptions caOpts;<BR> caOpts.setAsCA();<BR> \
caOpts.setValidityPeriod( QDateTime( QDate(2008, 1, 1) ), QDateTime( QDate(2008, 12, \
31) ) );<BR> QCA::Certificate caCert = QCA::Certificate( caOpts, caKey );<BR> \
QCA::CertificateAuthority ca( caCert, caKey, QString() );<BR><BR> QCA::PrivateKey \
testKey = QCA::KeyGenerator().createRSA( 512 );<BR> QCA::CertificateOptions \
testOpts;<BR> testOpts.setValidityPeriod( QDateTime( QDate(2008, 1, 1) ), \
QDateTime( QDate(2008, 12, 31) ) );<BR> QCA::CertificateRequest testReq = \
QCA::CertificateRequest( testOpts, testKey );<BR> QCA::Certificate testCert = \
ca.signRequest( testReq, QDateTime( QDate( 2008, 12, 31 ) ) );<BR> <BR> \
qDebug() << __FUNCTION__ << testCert.isSelfSigned() << \
testCert.subjectKeyId().toHex() << testCert.issuerKeyId().toHex();<BR> \
<BR> // Leads to linker error:<BR> //ca.createCertificate( \
testReq.subjectPublicKey(), testOpts );<BR>}<BR><BR>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.<BR></P><P></P><P>Regards,</P><P>Kjell Rune \
Skaaraas</P></td></tr></table><br>
<hr size=1><br><table><tr><td>Alt i ett. Få <a \
href=http://no.mail.yahoo.com>Yahoo! Mail</a> med adressekartotek, kalender og \
notisblokk.</td></tr></table>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic