我有一个与专用服务器通信的应用程序,我想实现 https 通信......我正在为我的所有请求使用 sthttprequest 包装器,这是一个示例请求:
__block STHTTPRequest *up = [STHTTPRequest requestWithURLString:@"http://www.server.com/page.php"];
up.POSTDictionary = @{@"pass":@"xxxx","user":@"username"};
up.completionBlock = ^(NSDictionary *headers, NSString *body) {
};
up.errorBlock = ^(NSError *error) {
};
[up startAsynchronous];
对于服务器,我将购买一个 ssl 证书,但是我如何为我的客户端 ios 应用程序实现 https?我正在尝试创建保护数据的最佳解决方案,因此我不会使用自签名证书……我已阅读有关“中间人”攻击的漏洞。