The certificate for this server is invalid

前端 未结 9 1860
花落未央
花落未央 2021-02-13 18:04

I know that if I use following nsurlconnectiondelegate it will be fixed

– connection:willSendRequestForAuthenticationChallenge: – connection:canAuthenti

9条回答
  •  悲哀的现实
    2021-02-13 18:55

    you can't fix it with the way you are trying

    • either drop to CFNetworking to allow bad certs
    • use NSConnection with a delegate and an undoc'd method
    • use the private API you found

    all not good. CFNetwork would have to be OK for apple for now but the other 2 methods aren't even appstore-safe

    Better get the server fixed. Thats the easiest and CLEANEST

提交回复
热议问题