diff options
author | Thorvald Natvig <slicer@users.sourceforge.net> | 2008-07-07 13:08:25 +0400 |
---|---|---|
committer | Thorvald Natvig <slicer@users.sourceforge.net> | 2008-07-07 13:08:25 +0400 |
commit | 325022b59898888d1cd4619f4a29cfb486b7d5d8 (patch) | |
tree | abd803115ef621cd19382f5cfc8f02c840684845 /src/murmur/Cert.cpp | |
parent | 3056df3138d70641883107654613cb0e512034ef (diff) |
SSL PassPhrase
git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@1196 05730e5d-ab1b-0410-a4ac-84af385074fa
Diffstat (limited to 'src/murmur/Cert.cpp')
-rw-r--r-- | src/murmur/Cert.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/murmur/Cert.cpp b/src/murmur/Cert.cpp index 2943e0895..f439c3cf3 100644 --- a/src/murmur/Cert.cpp +++ b/src/murmur/Cert.cpp @@ -46,7 +46,7 @@ int add_ext(X509 * crt, int nid, char *value) { }
void Server::initializeCert() {
- QByteArray crt, key;
+ QByteArray crt, key, pass;
if (! QSslSocket::supportsSsl()) {
qFatal("Qt without SSL Support");
@@ -54,6 +54,7 @@ void Server::initializeCert() { crt = getConf("certificate", QString()).toByteArray();
key = getConf("key", QString()).toByteArray();
+ pass = getConf("passphrase", QByteArray()).toByteArray();
if (! crt.isEmpty()) {
qscCert = QSslCertificate(crt);
@@ -76,14 +77,14 @@ void Server::initializeCert() { QSsl::KeyAlgorithm alg = qscCert.publicKey().algorithm();
if (! key.isEmpty()) {
- qskKey = QSslKey(key, alg);
+ qskKey = QSslKey(key, alg, QSsl::Pem, QSsl::PrivateKey, pass);
if (qskKey.isNull()) {
log("Failed to parse key.");
}
}
if (! crt.isEmpty() && qskKey.isNull()) {
- qskKey = QSslKey(crt, alg);
+ qskKey = QSslKey(crt, alg, QSsl::Pem, QSsl::PrivateKey, pass);
if (! qskKey.isNull()) {
log("Using key from certificate.");
}
|