I am currently developing an application which allows two establish a TLS session between two iOS devices.
The session is established between a Centra and a Peripheral that communicate via BLE (Core Bluetooth) library.
The server must hold the certificate and send it to the client which will validate it.
Does Apple's Secure Transport library handle all this automatically ? Is there any example for establishing a TLS session between two iOS devices ?
Thanks.
Related
I am using Apprtc library for the real-time connection.
this is my server host URL #"https://appr.tc". Connection successfully established to any network, but in the audio/video sense
audio/video only works on same/private network iOS to iOS or iOS to Android
in public network audio/video only work in iOS to Android , Not working iOS
device to iOS device .
do you have any idea ?
TL;DR You need to bring up a TURN server, and configure the client with the addresses of your TURN server.
WebRTC attempts to connect two peers directly, but that's not always possible in all network configurations (e.g. when both sides are behind a NAT or a Firewall). In these cases, WebRTC will fallback to using a TURN server. It's basically a server that both peers can connect to, and it forwards packets from one to the other.
I m currently working on iOS BLE application. To secure the connection between the smartphone which is in Central mode and the head unit which is in peripheral mode we need to implement TLS protocole over BLE.
To send the certificate which is big data for BLE we will use a segmentation protocole.
We need to use TLS because we can't be hack easily on our system and BLE 4.2 which is more secure than 4.0 is not implement in enough phone.
I have see that secure transport allow to make TLS on iOS (https://developer.apple.com/reference/security/secure_transport) and I have not see that I can't implement it over BLE.
Did someone have already implement TLS with secure transport?
If yes can he explain me how I can use it in my case? Or if I can't use it can he explain me why?
After several days of research about how to use Secure Transport i found that all the example and projects are working with BSD sockets and Streams.
In Apple documentation there is no statement confirming or denying the possibility of applying TLS over Core Bluetooth.
I have tried in many ways to establish a TLS session between two iOS devices that exchange data via Core Bluetooth. However i always get error -9806 every time i call the SSLHandShake() method.
In almost every example, a BSD Socket should be configured and connected before starting TLS HandShake.
Once the Socket is connected, Secure Transport exchanges automatically the TLS settings between two peers after calling SSLHandShake() method.
I suppose that Secure Transport supports BSD Sockets when it comes to establish a TLS HandShake. I did not find any solution to make Secure Transport exchange TLS settings between two peers connected via Core Bluetooth (BLE).
Is it possible to establish a TLS session between two iOS devices that have been connected via Core Bluetooth ? Should i forget about Secure Transport and implement TLS protocol (over Core Bluetooth) by myself without using Secure Transport ?
Thanks :)
I want to create an iOS app to connect my Wifi OBD 2 to the iPhone. But i have no idea on how to do the peer connection with swift 2. I have the OBD doc to communicate with it (https://www.elmelectronics.com/wp-content/uploads/2016/07/ELM327DS.pdf - page 30).
I tried to search the same thing on android and windows but the problem is my knowledge on peer to peer iOS communication.
I see a lot of iOS app for OBD protocol on app store, I'm sure that anybody can help me !
Thank you !
You don't need to know about real wifi peer2peer communication. Once you attached your phone to the wifi network created by the obd2 wifi adapter, you will be able to establish a good old TCP-connection to it. By default most wifi adapters listen at 192.168.0.10:35000 for incoming connections.
After establishing the TCP connection you can communicate via AT and PIDs by writing/reading to/from the socket. The actual protocol is described in ELM327 manual and the ISO/SAE standard documents.
My iOS app is connected and exchanging sensitive data with a BLE accessory, I want the data communication to be secured so I use an encrypted BLE connection (=paired).
But is there a way for my app to be the only app that can receive the data from the accessory?
I want to make sure it is not possible for another app running in the background to receive the data sent by the accessory.
Core Bluetooth will provide access to any apps that are on the device but if you implement your communication using additional authentication or encryption, then it will be harder for other apps to make successful connections to the peripheral.
I think it helps to think of the peripheral as an ssh server. Anyone can open a connection to it but they will be connected only if the correct credentials are provided to the server. Your peripheral should work similarly. The required method for the authentication depends on your requirements.