About the experience sharing of HTTPS forced handshake in iOS SDK

Source: Internet
Author: User
Tags dedicated ip

Because of the project needs, the HTTPS forced handshake has been studied, the sharing processing method is as follows:

I. Problems and needs

problem: The Access Party may have HTTPS certificate authentication for the same domain name, and under the caching mechanism, the HTTPS handshake is reused by default in the SDK, or Nsurlprotocol is blocked for authentication.

Requirements: based on the SDK side does not trust the access authentication, the need to force a handshake.

Second, the theoretical premise

1. Handshake cache with IP address, DNS domain name, port key for handshake caching

2. "Www.xxx.com", "www.xxx.com." will have the same DNS resolution result

Third, the solution

1. Server-side gives a dedicated IP, domain name or port

2. Client:

A. When accessing the API at the Unified portal, add the "." After the domain name. As a forged URL

B. After forging the URL trigger handshake, the request returns Didload or failed did fail is not processed, the forged API is removed ".",

Change back to standard API, continue normal communication

C. SDK handshake add identity, because "skip verification" caused by Urlprotocol or certificate cache can be defended

Iv. Negative effects

1. Increased network access time by no longer using the handshake of the Access party

2. Increased communication time for a forged URL access

About the experience sharing of HTTPS forced handshake in iOS SDK

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.