Marino Faggiana 7 年之前
父节点
当前提交
74f051c027

+ 1 - 0
iOSClient/Networking/CCNetworking.h

@@ -110,6 +110,7 @@
 @property (nonatomic, strong) NSString *fileName;
 @property (nonatomic, strong) NSString *fileNameTo;
 @property (nonatomic, strong) NSString *key;
+@property (nonatomic, strong) NSString *keyCipher;
 @property (nonatomic, strong) id options;
 @property (nonatomic, strong) NSString *password;
 @property (nonatomic, strong) NSString *pathFolder;

+ 1 - 0
iOSClient/Networking/CCNetworking.m

@@ -1551,6 +1551,7 @@
     [metadataNet setFileName: self.fileName];
     [metadataNet setFileNameTo: self.fileNameTo];
     [metadataNet setKey: self.key];
+    [metadataNet setKeyCipher: self.keyCipher];
     [metadataNet setOptions: self.options];
     [metadataNet setPassword: self.password];
     [metadataNet setPathFolder: self.pathFolder];

+ 1 - 1
iOSClient/Networking/OCNetworking.m

@@ -1780,7 +1780,7 @@
     OCCommunication *communication = [CCNetworking sharedNetworking].sharedOCCommunication;
     
     // URL Encode
-    NSString *privateKeyChiper = [CCUtility URLEncodeStringFromString:_metadataNet.key];
+    NSString *privateKeyChiper = [CCUtility URLEncodeStringFromString:_metadataNet.keyCipher];
     
     [communication setCredentialsWithUser:_activeUser andUserID:_activeUserID andPassword:_activePassword];
     [communication setUserAgent:[CCUtility getUserAgent]];

+ 3 - 3
iOSClient/Security/NCEntoToEndInterface.swift

@@ -253,8 +253,8 @@ class NCEntoToEndInterface : NSObject, OCNetworkingDelegate  {
                 let metadataNet: CCMetadataNet = CCMetadataNet.init(account: self.appDelegate.activeAccount)
 
                 metadataNet.action = actionStoreEndToEndPrivateKeyCipher
-                metadataNet.key = privateKeyChiper
-                metadataNet.options = privateKey
+                metadataNet.key = privateKey! as String
+                metadataNet.keyCipher = privateKeyChiper
                 metadataNet.password = e2ePassphrase
                     
                 self.appDelegate.addNetworkingOperationQueue(self.appDelegate.netQueue, delegate: self, metadataNet: metadataNet)
@@ -275,7 +275,7 @@ class NCEntoToEndInterface : NSObject, OCNetworkingDelegate  {
     
     func storeEnd(toEndPrivateKeyCipherSuccess metadataNet: CCMetadataNet!) {
         
-        CCUtility.setEndToEndPrivateKey(appDelegate.activeAccount, privateKey: metadataNet.options as! String)
+        CCUtility.setEndToEndPrivateKey(appDelegate.activeAccount, privateKey: metadataNet.key)
         CCUtility.setEndToEndPassphrase(appDelegate.activeAccount, passphrase:metadataNet.password)
         
         // request publicKey Server()