ASIHTTPRequest: https with SSL

后端 未结 2 1982
孤街浪徒
孤街浪徒 2020-12-08 03:25

How to implement a https connection with SSL and ASIHTTPRequest? Are there some special steps to do? Can it be that this has nothing to do with ASIHTTPReq

2条回答
  •  没有蜡笔的小新
    2020-12-08 03:53

    So you've got a few questions here:

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

    2. you don't need a 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 vulnerable to man-in-the-middle attacks etc.

    3. 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.)

    4. 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.

提交回复
热议问题