Thursday, February 26, 2026
HomeiOS DevelopmentHow to connect with SSL socket server utilizing react native for iOS...

How to connect with SSL socket server utilizing react native for iOS utilizing self signed certificates?


I’m fairly new to SSL. I’m utilizing react-native-tcp-socket for establishing connection to a TAK(Tactical Assault Equipment server). The server requires a CA and consumer certificates to attach. On the android facet, this code works as meant

import TcpSocket from 'react-native-tcp-socket';
const consumer = TcpSocket.connectTLS({
host: 'ip-address of TAK server' // seems like  35.201.200.23,
port: 8089,
ca:'PEM string certificates authority',
key: 'PEM string personal key of consumer certificates',
cert: 'PEM string of consumer certificates'
})

After I run the identical code for iOS i get the error kCFStreamErrorDomainSSL -9824

I’m utilizing self signed certificates on this case.

If anybody is aware of implement this(consumer authentication in SSL TCP sockets) for iOS are you able to inform me do it?

I’ve additionally tried offering ca as a file url to the Certificates Authority for iOS as indicated within the ios code of the library nonetheless get the identical error. I’ve additionally added the ip tackle to information plist beneath NSAppTransportSecurity, NSAllowsArbitraryLoads

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments