diff options
Diffstat (limited to 'distfoldd')
-rw-r--r-- | distfoldd/localkey.cc | 6 | ||||
-rw-r--r-- | distfoldd/localkey.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/distfoldd/localkey.cc b/distfoldd/localkey.cc index 9855ff4..f104afd 100644 --- a/distfoldd/localkey.cc +++ b/distfoldd/localkey.cc @@ -19,6 +19,12 @@ bool LocalKey::setupLocalKey() if (local_key_dir.exists("server.crt") && local_key_dir.exists("server.key")) { return true; } + if (!local_key_dir.exists()) { + if (!local_key_dir.mkpath(local_key_dir.absolutePath())) { + qWarning() << "Could not create local key directory"; + return false; + } + } QCA::Initializer qca; diff --git a/distfoldd/localkey.h b/distfoldd/localkey.h index ad23091..9d9e6a8 100644 --- a/distfoldd/localkey.h +++ b/distfoldd/localkey.h @@ -10,8 +10,6 @@ private: public: static QString localKeyDir(); - static QString localCertPath(); - static QString localPrivateKeyPath(); static bool setupLocalKey(); }; |