wulv
V2EX  ›  SSL

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

  •  
  •   wulv · Nov 19, 2019 · 3244 views
    This topic created in 2438 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   ·   5761 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 01:57 · PVG 09:57 · LAX 18:57 · JFK 21:57
    ♥ Do have faith in what you're doing.