Skip to content

Regenerate self signed certificate

Fernando Coelho edited this page Jul 18, 2019 · 1 revision

In case of the self signed certificate expires to regenerate it follow these instructions

1. Create a configuration file config.cnf

[req]
default_bits = 2048
prompt = no
default_md = sha256
x509_extensions = v3_req
distinguished_name = dn

[dn]
C = BR
ST = Rio de Janeiro
L = Rio de Janeiro
O = VTEX
emailAddress = vtex@vtex.com.br
CN = vtexlocal.com.br

[v3_req]
subjectAltName = @alt_names

[alt_names]
DNS.1 = vtexlocal.com.br
DNS.2 = www.vtexlocal.com.br
DNS.2 = *.vtexlocal.com.br

2. Run the following command in command line

$ openssl req -new -x509 -newkey rsa:2048 -sha256 -nodes -keyout server.key -days 3560 -out server.crt -config config.cnf

3. Commit the new server.crt and server.key files.