How to use a self-signed SSL certificate when developing with Trigger.io?

Our backend is on rails, and for several reasons, the development environment should run on rails using a self-signed SSL certificate. This works fine on the desktop after manually authenticating the certificate.

Using Trigger.io, we are developing a mobile application focused on iOS from the same backend. It would be ideal for us to be able to start the rail server using SSL (so that we can compare the output of the browser) and still have the iOS simulator connect correctly without complaining about invalid certificates.

The production uses the correct ssl-cert, but what is the best way to configure the simulator?

+4
source share
2 answers

You can try installing the CRT file on the device as follows:

This is similar to how you can debug SSL with a proxy server, as described here

+2
source

For testing purposes, you can create a category around NSURLRequest that ignores certificates:

@implementation NSURLRequest (IgnoreSSL) + (BOOL)allowsAnyHTTPSCertificateForHost:(NSString*)host { return YES; } @end 

This clearly cannot be sent to the application store and should not be used during production.

0
source

Source: https://habr.com/ru/post/1432368/


All Articles