Certificates
Each wrapper uses SSL connection for all the communication between Endpoint and Bridge. Since Bridge is locally installed by the developer, it's necessary to provide certificates for this connection.
You can use proper function in each language for setting the certificates:
var endpointContainer: PrivMXEndpointContainer = PrivMXEndpointContainer()
guard let pathToCerts = FileManager.default
.urls(for: .documentDirectory, in: .userDomainMask)
.first?.appendingPathComponent("cert.pem").path()
else {return}
try? endpointContainer.setCertsPath(to: pathToCerts)
Source of Certificates
If you use properly signed certificates issued by a trusted CA, you can provide them for the Endpoint. For example CA Certificates from Mozilla:
Custom certificates
If your Bridge has custom signed certificates, provide them accordingly.
If you use the Endpoint in web environment with custom certificates, you should add them as trusted to your system.
Using Endpoint with a non-secure Bridge installation
For development purposes, the Bridge can be installed locally and accessed by a non-secure HTTP connection.
In such a case, you can omit adding certificates to the Endpoint and configure your app properly by editing the Info.plist
file:
App Transport Security Settings > Allow Arbitrary Loads > YES