Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2017-02-21 01:44:54 +0300
committerMikkel Krautz <mikkel@krautz.dk>2017-02-21 01:44:54 +0300
commit32ca3cfe7de47f52b0e36982ee34411e70a49f77 (patch)
tree13bdc951059cbb958843d6ced94d7dd27c42dd89 /src/murmur/Cert.cpp
parent441063f8f8116a3524c63eb59fa98bcdd58d7e83 (diff)
Server, Cert: make use of Server::privateKeyFromPEM() method.
Diffstat (limited to 'src/murmur/Cert.cpp')
-rw-r--r--src/murmur/Cert.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/murmur/Cert.cpp b/src/murmur/Cert.cpp
index 5c5a37c8c..004c11744 100644
--- a/src/murmur/Cert.cpp
+++ b/src/murmur/Cert.cpp
@@ -92,26 +92,14 @@ void Server::initializeCert() {
QList<QSslCertificate> ql;
- // Attempt to load key as an RSA key or a DSA key
+ // Attempt to load the private key.
if (! key.isEmpty()) {
- qskKey = QSslKey(key, QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey, pass);
- if (qskKey.isNull())
- qskKey = QSslKey(key, QSsl::Dsa, QSsl::Pem, QSsl::PrivateKey, pass);
-#if QT_VERSION >= 0x050000
- if (qskKey.isNull())
- qskKey = QSslKey(key, QSsl::Ec, QSsl::Pem, QSsl::PrivateKey, pass);
-#endif
+ qskKey = Server::privateKeyFromPEM(key, pass);
}
// If we still can't load the key, try loading any keys from the certificate
if (qskKey.isNull() && ! crt.isEmpty()) {
- qskKey = QSslKey(crt, QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey, pass);
- if (qskKey.isNull())
- qskKey = QSslKey(crt, QSsl::Dsa, QSsl::Pem, QSsl::PrivateKey, pass);
-#if QT_VERSION >= 0x050000
- if (qskKey.isNull())
- qskKey = QSslKey(crt, QSsl::Ec, QSsl::Pem, QSsl::PrivateKey, pass);
-#endif
+ qskKey = Server::privateKeyFromPEM(crt);
}
// If have a key, walk the list of certs, find the one for our key,