大佬教程收集整理的这篇文章主要介绍了iOS 10.3:模拟器HTTPS localhost:SSL错误,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
NSURLSession/NSURLConnection http load Failed (kcfStreamErrorDomainSSL,-9802) [] nw_coretls_callBACk_handshake_message_block_invoke_3 tls_handshake_conTinue: [-9807]
Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cAnnot be made." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x600000527080>,NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?,_kcfStreamErrorDomainKey=3,_kcfStreamErrorCodeKey=-9802,NSErrorPeerCertificateChainKey=( "<cert(0x7ff3e1867200) s: localhost i: localhost>" ),NSUnderlyingError=0x60800024e880 {Error Domain=kcfErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kcfStreamPropertySSLClientCertificateState=0,kcfStreamPropertySSLPeerTrust=<SecTrustRef: 0x600000527080>,_kcfNetworkcfStreamSSLErrorOriginalValue=-9802,kcfStreamPropertySSLPeerCertificates=( "<cert(0x7ff3e1867200) s: localhost i: localhost>" )}},NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cAnnot be made.,NSErrorFailingURLKey=https://localhost:3000/v1/login,NSErrorFailingURLStringKey=https://localhost:3000/v1/login,NSErrorClientCertificateStateKey=0}
参考:Apple: Developer: Guides and Sample Code: Technical Note TN2232: HTTPS Server Trust Evaluation
要创建自签名SSL证书,我使用以下命令:
openssl genrsa -aes256 -passout pass:x -out server.pass.key 2048 openssl rsa -passin pass:x -in server.pass.key -out server.key rm server.pass.key openssl req -new -sha256 -key server.key -out server.csr -subj /CN=localhost openssl x509 -req -sha512 -days 365 -in server.csr -signkey server.key -out server.crt
以上是大佬教程为你收集整理的iOS 10.3:模拟器HTTPS localhost:SSL错误全部内容,希望文章能够帮你解决iOS 10.3:模拟器HTTPS localhost:SSL错误所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。