0

I am making post request form my application to server for login. I want to know is it safe? Is the data can be traced? For making a post request I am suing the following code:

NSURL *s =[self getAbsoluteURL:url];
NSMutableURLRequest *requestURL = [NSMutableURLRequest requestWithURL:s cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.00];
[requestURL setHTTPMethod:@"POST"];
[requestURL setHTTPBody:[parameter dataUsingEncoding:NSUTF8StringEncoding]];
NSHTTPURLResponse *response;
NSError *error;
NSData *apiData = [NSURLConnection sendSynchronousRequest:requestURL returningResponse:&response error:&error];

I want to know how secure is my process.

halfer
  • 19,824
  • 17
  • 99
  • 186
Rashad
  • 11,057
  • 4
  • 45
  • 73
  • When you say "safe", are you only talking about making sure you're safe from prying eyes on the network? Or do you also mean "safe" insofar as that if someone gains access to the physical device, the information is secure? – Rob Mar 30 '14 at 13:29
  • @Rob>> Just wanna be safe from network prying eyes. – Rashad Mar 31 '14 at 01:41
  • Then using HTTPS with some robust authentication process, such the certificates approach that Wain discussed, will accomplish that. – Rob Mar 31 '14 at 02:14

1 Answers1

1

If the URL is http, then it isn't 'safe' at all.

To be 'safe' you want to use https and SSL certificate pinning. It would be beneficial to you to use AFNetworking for your networking code.

Wain
  • 118,658
  • 15
  • 128
  • 151