wulv
V2EX  ›  SSL

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

  •  
  •   wulv · Nov 19, 2019 · 3132 views
    This topic created in 2378 days ago, the information mentioned may be changed or developed.
    3 replies    2019-11-20 16:45:17 +08:00
    Sricecake
        1
    Sricecake  
       Nov 19, 2019
    wulv
        2
    wulv  
    OP
       Nov 20, 2019
    @Sricecake 怎么检测的啊?
    Sricecake
        3
    Sricecake  
       Nov 20, 2019
    在 NSURLSession 中 可以在这个回调中判断
    - (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
    completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition,
    NSURLCredential * _Nullable credential))completionHandler;
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2959 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 08:58 · PVG 16:58 · LAX 01:58 · JFK 04:58
    ♥ Do have faith in what you're doing.