diff options
author | dreijer <dreijer@echobit.net> | 2012-03-22 14:17:38 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-03-22 17:14:32 (GMT) |
commit | 85939c333765a4f028efa6f3037abd8de911ede8 (patch) | |
tree | 827b31bc062cfef1432eb4b984760ec48d9e32b0 /Swiften/Client | |
parent | 2fa37f2976b933ca0bcf5f85dd1615805776d67d (diff) | |
download | swift-contrib-85939c333765a4f028efa6f3037abd8de911ede8.zip swift-contrib-85939c333765a4f028efa6f3037abd8de911ede8.tar.bz2 |
Manual certificate verification. Added two additional TLS errors related to revocation.
License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
Diffstat (limited to 'Swiften/Client')
-rw-r--r-- | Swiften/Client/ClientError.h | 2 | ||||
-rw-r--r-- | Swiften/Client/CoreClient.cpp | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Swiften/Client/ClientError.h b/Swiften/Client/ClientError.h index baf1b0a..2f2d2af 100644 --- a/Swiften/Client/ClientError.h +++ b/Swiften/Client/ClientError.h @@ -40,6 +40,8 @@ namespace Swift { InvalidCertificateSignatureError, InvalidCAError, InvalidServerIdentityError, + RevokedError, + RevocationCheckFailedError }; ClientError(Type type = UnknownError) : type_(type) {} diff --git a/Swiften/Client/CoreClient.cpp b/Swiften/Client/CoreClient.cpp index f7e3b21..14481c6 100644 --- a/Swiften/Client/CoreClient.cpp +++ b/Swiften/Client/CoreClient.cpp @@ -271,6 +271,12 @@ void CoreClient::handleSessionFinished(boost::shared_ptr<Error> error) { case CertificateVerificationError::InvalidServerIdentity: clientError = ClientError(ClientError::InvalidServerIdentityError); break; + case CertificateVerificationError::Revoked: + clientError = ClientError(ClientError::RevokedError); + break; + case CertificateVerificationError::RevocationCheckFailed: + clientError = ClientError(ClientError::RevocationCheckFailedError); + break; } } actualError = boost::optional<ClientError>(clientError); |