X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fsqlitestorage.cpp;h=392459bfad134fb70c54446a8b896e1b05a6ff66;hp=a418d05516dcfd44ceb114feaf0c33292b964242;hb=1adc00219ba072da57994764d086beed8ffb7bb4;hpb=7e18cab1aef55e7720c70319d98fd0c2bce7c160 diff --git a/src/core/sqlitestorage.cpp b/src/core/sqlitestorage.cpp index a418d055..392459bf 100644 --- a/src/core/sqlitestorage.cpp +++ b/src/core/sqlitestorage.cpp @@ -214,8 +214,14 @@ IdentityId SqliteStorage::createIdentity(UserId user, CoreIdentity &identity) { query.bindValue(":kickreason", identity.kickReason()); query.bindValue(":partreason", identity.partReason()); query.bindValue(":quitreason", identity.quitReason()); +#ifdef HAVE_SSL query.bindValue(":sslcert", identity.sslCert().toPem()); query.bindValue(":sslkey", identity.sslKey().toPem()); +#else + query.bindValue(":sslcert", QByteArray()); + query.bindValue(":sslkey", QByteArray()); +#endif + safeExec(query); identityId = query.lastInsertId().toInt(); @@ -269,8 +275,13 @@ bool SqliteStorage::updateIdentity(UserId user, const CoreIdentity &identity) { query.bindValue(":kickreason", identity.kickReason()); query.bindValue(":partreason", identity.partReason()); query.bindValue(":quitreason", identity.quitReason()); +#ifdef HAVE_SSL query.bindValue(":sslcert", identity.sslCert().toPem()); query.bindValue(":sslkey", identity.sslKey().toPem()); +#else + query.bindValue(":sslcert", QByteArray()); + query.bindValue(":sslkey", QByteArray()); +#endif query.bindValue(":identityid", identity.id().toInt()); safeExec(query); @@ -344,8 +355,10 @@ QList SqliteStorage::identities(UserId user) { identity.setKickReason(query.value(15).toString()); identity.setPartReason(query.value(16).toString()); identity.setQuitReason(query.value(17).toString()); +#ifdef HAVE_SSL identity.setSslCert(query.value(18).toByteArray()); identity.setSslKey(query.value(19).toByteArray()); +#endif nickQuery.bindValue(":identityid", identity.id().toInt()); QList nicks;