From 94c03aaeaffaa3b5412e5ad2bd9b52eca470c2da Mon Sep 17 00:00:00 2001 From: manuroe Date: Fri, 17 Feb 2017 15:10:21 +0100 Subject: [PATCH] Self-signed homeserver: Moved the code that trusts already trusted certificate into MXRestClient Related to https://github.com/matrix-org/matrix-ios-sdk/pull/248 --- MatrixKit/Models/Account/MXKAccount.m | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/MatrixKit/Models/Account/MXKAccount.m b/MatrixKit/Models/Account/MXKAccount.m index 24f178cd3..e1cfb2fac 100644 --- a/MatrixKit/Models/Account/MXKAccount.m +++ b/MatrixKit/Models/Account/MXKAccount.m @@ -1121,18 +1121,6 @@ - (void)prepareRESTClient mxRestClient = [[MXRestClient alloc] initWithCredentials:mxCredentials andOnUnrecognizedCertificateBlock:^BOOL(NSData *certificate) { - // Check whether the provided certificate is the one trusted by the user during login/registration step. - if (mxCredentials.allowedCertificate && [mxCredentials.allowedCertificate isEqualToData:certificate]) - { - return YES; - } - - // Check whether the user has already ignored this certificate change. - if (mxCredentials.ignoredCertificate && [mxCredentials.ignoredCertificate isEqualToData:certificate]) - { - return NO; - } - if (_onCertificateChangeBlock) { if (_onCertificateChangeBlock (self, certificate))