SSL Erreur de Connexion au Serveur via iPhone

Que j'essaie d'établir une connexion HTTPS sur un serveur à l'aide de mon application. Mais la connexion échoue en raison de l'erreur suivante

Erreur de Domaine=NSURLErrorDomain Code=-1200 "Une erreur SSL a eu lieu et d'une connexion sécurisée au serveur ne peut pas être fait." UserInfo=0x612eb30 {NSErrorFailingURLStringKey=https:myURL.com/signup, NSLocalizedRecoverySuggestion=souhaitez-vous vous connecter au serveur de toute façon?, NSErrorFailingURLKey=https:myURL.com/signup, NSLocalizedDescription=Une erreur SSL a eu lieu et d'une connexion sécurisée au serveur ne peut pas être fait., NSUnderlyingError=0x612eb70 "Une erreur SSL a eu lieu et d'une connexion sécurisée au serveur ne peut pas être fait."}

Le code pour se connecter à un serveur est

-(IBAction) handleEvents:(id)sender
 {
    if ((UIButton*)sender == submit) {

    [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;


    NSLog(@"Begin");
    NSData *urlData;
    NSURLResponse *response;
    NSError *error;

    NSString *url =[[NSString alloc]initWithFormat:@"%@signup",baseURL];
    NSURL *theURL =[NSURL URLWithString:url];
    NSMutableURLRequest *theRequest =[NSMutableURLRequest requestWithURL:theURL cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:0.0f];
    [theRequest setHTTPMethod:@"POST"];
    NSString *theBodyString = [NSString stringWithFormat:@"emailId=%@&mobileNumber=%@&appId=%@&password=%@&firstName=%@&lastName=%@"
                               ,@"[email protected]",@"919879876780",@"bf1c7a6b3d266a7fe350fcfc4dda275211c13c23" ,@"qwerty" , @"Dev" , @"Sri"];
    NSData *theBodyData = [theBodyString dataUsingEncoding:NSUTF8StringEncoding];

    [theRequest setHTTPBody:theBodyData];
    urlData = [NSURLConnection sendSynchronousRequest:theRequest returningResponse:&response error:&error];
    }
}

mon délégué méthodes sont

- (void)handleError:(NSError *)error
{
NSLog(@"----->%@",error);
}

- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
  [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;   

 }

- (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace {
    return [protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust];
   }

- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge (NSURLAuthenticationChallenge *)challenge {  
    NSLog(@"check auth");
    [challenge.sender continueWithoutCredentialForAuthenticationChallenge:challenge];
   }

Je suis coincé ici, et ne pouvait pas trouver un moyen de sortir.

Toute forme d'aide serait grandement appréciée.

merci d'avance!!

InformationsquelleAutor devsri | 2011-02-18