mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Remove the CertificateValidatorHook. (#5624)
This commit is contained in:
@@ -42,15 +42,6 @@ final class AppHooks: AppHooksProtocol {
|
||||
_bugReportHook.withLock { $0 = hook }
|
||||
}
|
||||
|
||||
private let _certificateValidatorHook: Mutex<CertificateValidatorHookProtocol> = Mutex(DefaultCertificateValidator())
|
||||
var certificateValidatorHook: CertificateValidatorHookProtocol {
|
||||
_certificateValidatorHook.withLock { $0 }
|
||||
}
|
||||
|
||||
func registerCertificateValidatorHook(_ hook: CertificateValidatorHookProtocol) {
|
||||
_certificateValidatorHook.withLock { $0 = hook }
|
||||
}
|
||||
|
||||
private let _oAuthPresenterHook: Mutex<OAuthPresenterHookProtocol> = Mutex(DefaultOAuthPresenterHook())
|
||||
var oAuthPresenterHook: OAuthPresenterHookProtocol {
|
||||
_oAuthPresenterHook.withLock { $0 }
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// Copyright 2025 Element Creations Ltd.
|
||||
// Copyright 2024-2025 New Vector Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
protocol CertificateValidatorHookProtocol {
|
||||
func respondTo(_ challenge: URLAuthenticationChallenge) async -> (URLSession.AuthChallengeDisposition, URLCredential?)
|
||||
}
|
||||
|
||||
struct DefaultCertificateValidator: CertificateValidatorHookProtocol {
|
||||
func respondTo(_ challenge: URLAuthenticationChallenge) async -> (URLSession.AuthChallengeDisposition, URLCredential?) {
|
||||
(.performDefaultHandling, nil)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user