您的位置:首页 > 理论基础 > 计算机网络

ASIHTTPRequest with SSL

2013-03-08 12:01 477 查看
How to implement a https connection with SSL and ASIHTTPRequest?

To do ssl with ASIHTTPRequest, you just need to pass a https url instead of a http one.

Are there some special steps to do?

you don't need an real SSL certificate, you can disable validation

using: [request setValidatesSecureCertificate:NO];

Disabling certificate validation does mean you lose some of the protection that SSL provides, making you vunerable to man-in-the-middle attacks etc.

Can it be that this has nothing to do with ASIHTTPRequest?

Yes, you're limited by what certificate signing authorities are supported by the iphone. So long as you stick to the big names it shouldn't really be an issue. (And as per 2. you can use a self signed certificate anyway.)

Can someone post a link or describe the process of how a https connection can be established?

It seems CCATS not necessary anymore, you need an ERN instead - the process has changed, as of Summer 2010! See http://tigelane.blogspot.com/2011/01/apple-itunes-export-restrictions-on.html.
There are also extra restrictions if you want to distribute on the French app store, see Using
SSL in an iPhone App - Export Compliance.

Ref:

http://stackoverflow.com/questions/3768893/asihttprequest-https-with-ssl

http://iphonedevelopment.blogspot.jp/2010/05/nsstream-tcp-and-ssl.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: