Super simple, just 3 steps

  1. Create a self-signed certificate with MAMP PROscreenshot-2016-12-04-13-07-19
  2.  Open OS X Keychain and click on File > Import Items… and select your .crt filescreenshot-2016-12-04-13-08-40
  3.  Double click on your imported certificate and change When using this certificate to Always Trustscreenshot-2016-12-04-13-12-35

Done 🙂