|
@@ -920,7 +920,7 @@ NSString const *OCWebDAVModificationDateKey = @"modificationdate";
|
|
|
[operation resume];
|
|
|
}
|
|
|
|
|
|
-- (void)signEndToEndPublicKey:(NSString*)serverPath onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success
|
|
|
+- (void)signEndToEndPublicKey:(NSString*)serverPath key:(NSString *)key onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success
|
|
|
failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure{
|
|
|
|
|
|
NSParameterAssert(success);
|
|
@@ -930,13 +930,16 @@ NSString const *OCWebDAVModificationDateKey = @"modificationdate";
|
|
|
NSMutableURLRequest *request = [self sharedRequestWithMethod:_requestMethod path:serverPath parameters:nil];
|
|
|
[request setValue:@"true" forHTTPHeaderField:@"OCS-APIRequest"];
|
|
|
|
|
|
+ _postStringKey = [NSString stringWithFormat: @"csr=%@",key];
|
|
|
+ [request setHTTPBody:[_postStringKey dataUsingEncoding:NSUTF8StringEncoding]];
|
|
|
+
|
|
|
OCHTTPRequestOperation *operation = [self mr_operationWithRequest:request onCommunication:sharedOCCommunication success:success failure:failure];
|
|
|
[self setRedirectionBlockOnDatataskWithOCCommunication:sharedOCCommunication andSessionManager:sharedOCCommunication.networkSessionManager];
|
|
|
|
|
|
[operation resume];
|
|
|
}
|
|
|
|
|
|
-- (void)storeEndToEndPrivateKeyCipher:(NSString*)serverPath onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success
|
|
|
+- (void)storeEndToEndPrivateKeyCipher:(NSString*)serverPath key:(NSString *)key onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success
|
|
|
failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure{
|
|
|
|
|
|
NSParameterAssert(success);
|
|
@@ -946,6 +949,9 @@ NSString const *OCWebDAVModificationDateKey = @"modificationdate";
|
|
|
NSMutableURLRequest *request = [self sharedRequestWithMethod:_requestMethod path:serverPath parameters:nil];
|
|
|
[request setValue:@"true" forHTTPHeaderField:@"OCS-APIRequest"];
|
|
|
|
|
|
+ _postStringKey = [NSString stringWithFormat: @"privateKey=%@",key];
|
|
|
+ [request setHTTPBody:[_postStringKey dataUsingEncoding:NSUTF8StringEncoding]];
|
|
|
+
|
|
|
OCHTTPRequestOperation *operation = [self mr_operationWithRequest:request onCommunication:sharedOCCommunication success:success failure:failure];
|
|
|
[self setRedirectionBlockOnDatataskWithOCCommunication:sharedOCCommunication andSessionManager:sharedOCCommunication.networkSessionManager];
|
|
|
|