| 
 | 1 | +# Generating SSL Certificates on macOS  | 
 | 2 | + | 
 | 3 | +When generating SSL Certificates on macOS, you must ensure that you're using brew's openssl binary and not the one provided by the OS.  | 
 | 4 | + | 
 | 5 | +To do that, find out where your openssl is installed by running:  | 
 | 6 | + | 
 | 7 | +```bash  | 
 | 8 | +$ brew info openssl  | 
 | 9 | +```  | 
 | 10 | + | 
 | 11 | +You should see something like this:  | 
 | 12 | + | 
 | 13 | +```  | 
 | 14 | +[email protected]: stable 1.1.1i (bottled) [keg-only]  | 
 | 15 | +Cryptography and SSL/TLS Toolkit  | 
 | 16 | +https://openssl.org/  | 
 | 17 | +/usr/local/Cellar/[email protected]/1.1.1i (8,067 files, 18.5MB)  | 
 | 18 | +  Poured from bottle on 2020-12-11 at 11:31:46  | 
 | 19 | +From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/[email protected]  | 
 | 20 | +License: OpenSSL  | 
 | 21 | +==> Caveats  | 
 | 22 | +A CA file has been bootstrapped using certificates from the system  | 
 | 23 | +keychain. To add additional certificates, place .pem files in  | 
 | 24 | +  /usr/local/etc/[email protected]/certs  | 
 | 25 | +
  | 
 | 26 | +and run  | 
 | 27 | +  /usr/local/opt/[email protected]/bin/c_rehash  | 
 | 28 | +
  | 
 | 29 | +[email protected] is keg-only, which means it was not symlinked into /usr/local,  | 
 | 30 | +because macOS provides LibreSSL.  | 
 | 31 | +
  | 
 | 32 | +If you need to have [email protected] first in your PATH run:  | 
 | 33 | +  echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> /Users/flavio/.bash_profile  | 
 | 34 | +
  | 
 | 35 | +For compilers to find [email protected] you may need to set:  | 
 | 36 | +  export LDFLAGS="-L/usr/local/opt/[email protected]/lib"  | 
 | 37 | +  export CPPFLAGS="-I/usr/local/opt/[email protected]/include"  | 
 | 38 | +
  | 
 | 39 | +For pkg-config to find [email protected] you may need to set:  | 
 | 40 | +  export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"  | 
 | 41 | +
  | 
 | 42 | +==> Analytics  | 
 | 43 | +install: 855,315 (30 days), 2,356,331 (90 days), 7,826,269 (365 days)  | 
 | 44 | +install-on-request: 139,236 (30 days), 373,801 (90 days), 1,120,685 (365 days)  | 
 | 45 | +build-error: 0 (30 days)  | 
 | 46 | +```  | 
 | 47 | + | 
 | 48 | +The important part is this:  | 
 | 49 | + | 
 | 50 | +> echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> /Users/flavio/.bash_profile  | 
 | 51 | +
  | 
 | 52 | +Instead of running `./tests/server/ssl/generate.sh`, you should instead run:  | 
 | 53 | + | 
 | 54 | +```bash  | 
 | 55 | +$ PATH= "/usr/local/opt/[email protected]/bin ./tests/server/ssl/generate.sh | 
 | 56 | +```  | 
 | 57 | +
  | 
 | 58 | +You should now be good to go.  | 
0 commit comments