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
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
相关文章推荐
- How to deal with "Incorrect NSStringEncoding value 0×0000 Error with ASIHTTPRequest" problem?
- ASIHttpRequest parses URL with spaces
- AFNetworking、ASIHTTPRequest中SSL的使用
- ASIHttpRequest "_UTTypeCopyPreferredTagWithClass", referenced from:
- AFNetworking、ASIHTTPRequest中SSL的使用
- ASIHTTPRequest with Https
- ASIHTTPRequest with Cookie
- AFNetworking、ASIHTTPRequest中SSL的使用
- ASIHTTPRequest with block
- ASIHttpRequest "_UTTypeCopyPreferredTagWithClass", referenced from:
- AFNetworking、ASIHTTPRequest中SSL的使用
- How to upload images with text using iPhone SDK using ASIHttpRequest ?
- iOS网络编程-ASIHTTPRequest框架同步请求
- ASIHTTPRequest 详解, http 请求终结者
- 问题 “No mapping found for HTTP request with URI [/rbiz4/uploadFile.html]” 的解决
- iOS疯狂详解之ASIHTTPRequest
- IOS项目实战-登录解析(Http请求) ASIHttpRequest
- 网络编程--ASI--(ASIHTTPRequest)介绍
- arc下asihttprequest等应用实现
- ASIHTTPRequest占用主线程问题解决