Ooops PER -> DER
This commit is contained in:
parent
b5a5416c19
commit
13589dfc0f
1 changed files with 4 additions and 3 deletions
|
@ -57,11 +57,12 @@ Daemon::Daemon(QObject *parent, const QList<QVariant>&)
|
||||||
|
|
||||||
//http://delta.affinix.com/docs/qca/rsatest_8cpp-example.html
|
//http://delta.affinix.com/docs/qca/rsatest_8cpp-example.html
|
||||||
QCA::PrivateKey privateKey = QCA::KeyGenerator().createRSA(1024);
|
QCA::PrivateKey privateKey = QCA::KeyGenerator().createRSA(1024);
|
||||||
config->group("myself").writeEntry("privateKey", privateKey.toPEM());
|
config->group("myself").writeEntry("privateKey", privateKey.toDER());
|
||||||
|
|
||||||
QCA::PublicKey publicKey = privateKey.toPublicKey();
|
QCA::PublicKey publicKey = privateKey.toPublicKey();
|
||||||
config->group("myself").writeEntry("publicKey", publicKey.toPEM());
|
config->group("myself").writeEntry("publicKey", publicKey.toDER());
|
||||||
|
//TODO: Store key in a PEM file instead (KStandardDirs::locate("appdata", "private.pem"))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Debugging
|
//Debugging
|
||||||
|
|
Loading…
Reference in a new issue