marinofaggiana 4 жил өмнө
parent
commit
f543acade7

+ 1 - 0
iOSClient/AppDelegate.swift

@@ -538,6 +538,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
                         
                         
             alertController.addAction(UIAlertAction(title: NSLocalizedString("_yes_", comment: ""), style: .default, handler: { action in
             alertController.addAction(UIAlertAction(title: NSLocalizedString("_yes_", comment: ""), style: .default, handler: { action in
                 NCNetworking.shared.writeCertificate(directoryCertificate: CCUtility.getDirectoryCerificates(), url: self.urlBase)
                 NCNetworking.shared.writeCertificate(directoryCertificate: CCUtility.getDirectoryCerificates(), url: self.urlBase)
+                CCUtility.clearCertificateError(self.account)
                 self.startTimerErrorNetworking()
                 self.startTimerErrorNetworking()
             }))
             }))
             
             

+ 1 - 0
iOSClient/Utility/CCUtility.h

@@ -143,6 +143,7 @@
 
 
 + (BOOL)getCertificateError:(NSString *)account;
 + (BOOL)getCertificateError:(NSString *)account;
 + (void)setCertificateError:(NSString *)account error:(BOOL)error;
 + (void)setCertificateError:(NSString *)account error:(BOOL)error;
++ (void)clearCertificateError:(NSString *)account;
 
 
 + (BOOL)getDisableLocalCacheAfterUpload;
 + (BOOL)getDisableLocalCacheAfterUpload;
 + (void)setDisableLocalCacheAfterUpload:(BOOL)disable;
 + (void)setDisableLocalCacheAfterUpload:(BOOL)disable;

+ 7 - 0
iOSClient/Utility/CCUtility.m

@@ -566,6 +566,13 @@
 #endif
 #endif
 }
 }
 
 
++ (void)clearCertificateError:(NSString *)account
+{
+    NSString *key = [@"certificateError" stringByAppendingString:account];
+    
+    [UICKeyChainStore setString:nil forKey:key service:NCGlobal.shared.serviceShareKeyChain];
+}
+
 + (BOOL)getDisableLocalCacheAfterUpload
 + (BOOL)getDisableLocalCacheAfterUpload
 {
 {
     return [[UICKeyChainStore stringForKey:@"disableLocalCacheAfterUpload" service:NCGlobal.shared.serviceShareKeyChain] boolValue];
     return [[UICKeyChainStore stringForKey:@"disableLocalCacheAfterUpload" service:NCGlobal.shared.serviceShareKeyChain] boolValue];