Unable to trust a self signed certificate on iphone

前端 未结 1 352
悲哀的现实
悲哀的现实 2021-01-05 06:41

I am currently trying to connect to a server with a self signed certificate. I am using NSURLConnection to connect to the server. How can I make sure that I only trust the

相关标签:
1条回答
  • 2021-01-05 07:11

    You'll need to make sure that your certificate has certain extensions. I configured a certificate with the following extensions, and it worked for me (OpenSSL format):

    basicConstraints=critical,CA:FALSE
    extendedKeyUsage=serverAuth
    subjectAltName=IP:192.168.x.y
    
    0 讨论(0)
提交回复
热议问题