diafygi / gethttpsforfree

Source code for https://gethttpsforfree.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

syntax error near unexpected token `(' at Step 2: Certificate Signing Request

jy1989 opened this issue · comments

Hello

I got this error when I run the step2-2 command in OSX
syntax error near unexpected token `('

Generate a CSR for your the domains you want certs for:
(replace "foo.com" with your domain)
Linux:
#change "/etc/ssl/openssl.cnf" as needed:
#  Debian: /etc/ssl/openssl.cnf
#  RHEL and CentOS: /etc/pki/tls/openssl.cnf
#  Mac OSX: /System/Library/OpenSSL/openssl.cnf

openssl req -new -sha256 -key domain.key -subj "/" \
  -reqexts SAN -config <(cat /etc/ssl/openssl.cnf \
  <(printf "[SAN]\nsubjectAltName=DNS:foo.com,DNS:www.foo.com"))

912a43b3-e622-4ee7-8276-9ebc7583ad9f

How to make it working ?

Here's what I did on OS X for this step:

openssl req -new -sha256 -key domain.key -out server.csr

You'll receive a number of prompts from openssl. The fields email address, challenge password, and optional company name can be left blank.

Thanks for the comment @radnor