V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wulv
V2EX  ›  SSL

ios 上的 app,能检测到打开的 https 链接是用的自签名证书吗?

  •  
  •   wulv · 2019-11-19 13:47:15 +08:00 · 2085 次点击
    这是一个创建于 1591 天前的主题,其中的信息可能已经有所发展或是发生改变。
    3 条回复    2019-11-20 16:45:17 +08:00
    Sricecake
        1
    Sricecake  
       2019-11-19 18:18:14 +08:00
    wulv
        2
    wulv  
    OP
       2019-11-20 11:20:18 +08:00
    @Sricecake 怎么检测的啊?
    Sricecake
        3
    Sricecake  
       2019-11-20 16:45:17 +08:00
    在 NSURLSession 中 可以在这个回调中判断
    - (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
    completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition,
    NSURLCredential * _Nullable credential))completionHandler;
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1065 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 22:45 · PVG 06:45 · LAX 15:45 · JFK 18:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.