如何在iOS中实现SSL固定? [英] How to implement SSL Pinning in iOS?

查看:49
本文介绍了如何在iOS中实现SSL固定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点困惑在我的iOS应用中实现SSL固定.我读了很多文章,有的说带证书的工具,有的说带公钥的工具.

I am little bit confuse to implement SSL pinning in my iOS app. I read many articles some are saying implement with Certificate and some are saying implement with public key.

我有一些疑问:

  1. 哪种方法最适合SSL固定?
  2. 如何获取证书和公钥?

如果有示例代码,这对我有很大帮助.

It helps me a lot if any one have example code.

推荐答案

很抱歉,我找到了解决方案 TrustKit

Sorry for late, I found the solution TrustKit

TrustKit是一个开放源代码框架,可轻松在任何iOS 8 +,macOS 10.10 +,tvOS 10+或watchOS 3+ App中部署SSL公钥固定和报告.它同时支持Swift和Objective-C应用.

TrustKit is an open source framework that makes it easy to deploy SSL public key pinning and reporting in any iOS 8+, macOS 10.10+, tvOS 10+ or watchOS 3+ App; it supports both Swift and Objective-C Apps.

这篇关于如何在iOS中实现SSL固定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆