diff --git a/daemon/daemon.cpp b/daemon/daemon.cpp index 07746abff..67e431379 100644 --- a/daemon/daemon.cpp +++ b/daemon/daemon.cpp @@ -57,11 +57,12 @@ Daemon::Daemon(QObject *parent, const QList&) //http://delta.affinix.com/docs/qca/rsatest_8cpp-example.html 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(); - 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