summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swift/Controllers/MainController.cpp1
-rw-r--r--Swiften/Client/ClientError.h1
-rw-r--r--Swiften/Client/CoreClient.cpp2
3 files changed, 4 insertions, 0 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index cc51ec3..165e87d 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -428,6 +428,7 @@ void MainController::handleDisconnected(const boost::optional<ClientError>& erro
case ClientError::CertificatePathLengthExceededError:
case ClientError::InvalidCertificateSignatureError:
case ClientError::InvalidCAError:
+ case ClientError::InvalidServerIdentityError:
// TODO
message = "Certificate error"; break;
}
diff --git a/Swiften/Client/ClientError.h b/Swiften/Client/ClientError.h
index 1c775e4..7ba0322 100644
--- a/Swiften/Client/ClientError.h
+++ b/Swiften/Client/ClientError.h
@@ -38,6 +38,7 @@ namespace Swift {
CertificatePathLengthExceededError,
InvalidCertificateSignatureError,
InvalidCAError,
+ InvalidServerIdentityError,
};
ClientError(Type type = UnknownError) : type_(type) {}
diff --git a/Swiften/Client/CoreClient.cpp b/Swiften/Client/CoreClient.cpp
index 2c3ab35..49726ca 100644
--- a/Swiften/Client/CoreClient.cpp
+++ b/Swiften/Client/CoreClient.cpp
@@ -202,6 +202,8 @@ void CoreClient::handleSessionFinished(boost::shared_ptr<Error> error) {
clientError = ClientError(ClientError::InvalidCertificateSignatureError);
case CertificateVerificationError::InvalidCA:
clientError = ClientError(ClientError::InvalidCAError);
+ case CertificateVerificationError::InvalidServerIdentity:
+ clientError = ClientError(ClientError::InvalidServerIdentityError);
}
}
actualError = boost::optional<ClientError>(clientError);