title: Synchonous SSL certificate handling on iPhone
body: <p>I was wondering if anyone can help me understand how to add SSL certificate handling to synchronous 
  connections to a https service.</p>
  
  <p>I know how to do this with asynchronous connections but not synchronous.</p>
  
  <pre><code>                NSString *URLpath = @"https://mydomain.com/";
      NSURL *myURL = [[NSURL alloc] initWithString:URLpath];
      NSMutableURLRequest *myURLRequest = [NSMutableURLRequest requestWithURL:myURL cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60];
      [myURL release];
      [myURLRequest setHTTPMethod:@"POST"];
  
      NSString *httpBodystr = @"setting1=1";
      [myURLRequest setHTTPBody:[httpBodystr dataUsingEncoding:NSUTF8StringEncoding]];
  
      NSHTTPURLResponse* myURLResponse; 
      NSError* myError;
      NSData* myDataResult = [NSURLConnection sendSynchronousRequest:myURLRequest returningResponse:&amp;myURLResponse error:&amp;myError];
  
              //I guess I am meant to put some SSL handling code here
  </code></pre>
  
  <p>Thank you.</p>