我正在使用uiwebview。我已將ssl固定到AFNetworking API調用。但我無法通過webview上的證書固定。我需要知道如何在webview重定向上傳遞ssl證書。我在通過IOS的webview SSL證書時遇到問題
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
[LivefyreAPICalls sslpinning:manager :@"certificate.com" :@"cer"];
NSString *content =[request.URL absoluteString];
NSArray *urlComponents = [content componentsSeparatedByString:@"&"];
for (NSString *keyValuePair in urlComponents)
{
NSArray *pairComponents = [keyValuePair componentsSeparatedByString:@"="];
NSString *key = [[pairComponents firstObject] stringByRemovingPercentEncoding];
NSString *value = [[pairComponents lastObject] stringByRemovingPercentEncoding];
[queryStringDictionary setObject:value forKey:key];
}
if ([queryStringDictionary valueForKey:@"id_token"]) {
[[UserNetwork manager] setUserFromSessionFromToken:[queryStringDictionary valueForKey:@"id_token"] :nil];
if ([UserNetwork manager].networkUsers.count >=1) {
SettingsViewController *settingsView=[self.storyboard instantiateViewControllerWithIdentifier:@"SettingsViewController"];
[self.navigationController pushViewController:settingsView animated:NO];
}else{
LiveBlogsTableViewController *blogView=[self.storyboard instantiateViewControllerWithIdentifier:@"liveblog"];
[self.navigationController pushViewController:blogView animated:YES];
}
}
return YES;
}
你試過?你能分享代碼 –
@Shabirjan我封鎖ssl_pinning.Can你請幫助,如果你知道....? – basha
嗨,你是可用於小型teamviewer會議 –