Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Self-signed homeserver: Moved the code that trusts already trusted ce… #244

Merged
merged 1 commit into from
Feb 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions MatrixKit/Models/Account/MXKAccount.m
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down