Post

Replies

Boosts

Views

Activity

Comment on How to trust self signed certificate programmatically ?
The communication is between app and a local accessory, So there is no fixed DNS. So we are using a self signed certificate. Using this code we are able to establish connection but the connection fails intermittently. Getting below error: `[connection] nw_socket_get_input_frames [C52:3] recvmsg(fd 37, 1024 bytes) [54: Connection reset by peer] Connection 52: received failure notification Connection 52: received ECONNRESET with incomplete TLS handshake - generating errSSLClosedNoNotify Connection 52: failed to connect 3:-9816, reason -1 Connection 52: encountered error(3:-9816) connection] nw_socket_handle_socket_event [C53:3] Socket SO_ERROR [54: Connection reset by peer] Connection 53: received failure notification [boringssl] boringssl_metrics_log_metric_block_invoke(144) Failed to log metrics Connection 53: failed to connect 3:-9816, reason -1 Connection 53: encountered error(3:-9816) Connection 54: received failure notification [boringssl] boringssl_metrics_log_metric_block_invoke(144) Failed to log metrics Connection 54: failed to connect 3:-9816, reason -1 Connection 54: encountered error(3:-9816)  Task .<1> HTTP load failed, 0/0 bytes (error code: -1200 [3:-9816])  Task .<1> finished with error [-1200] Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://ip:port/someEndPoint, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask .<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(     "LocalDataTask .<1>" ), NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://ip:port/someEndPoint, NSUnderlyingError=0x600000f22010 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificate` Could you please help to solve this issue
Mar ’22