Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the ssl certificates used for testing #44

Merged
merged 1 commit into from
Dec 9, 2019

Conversation

karuppiah7890
Copy link
Contributor

@karuppiah7890 karuppiah7890 commented Dec 8, 2019

Fixes #44

I created the certificate with one year validity. Is that okay? Or should I make for like 10 years or so? 😉 so that we won't have to update it for the time being. That way I don't have to document it (which I was planning to) in the repo for others to again create new certificates when they become invalid

This is how I did it -

server-csr.conf file

[ req ]
default_bits = 4096
prompt = no
default_md = sha256
req_extensions = req_ext
distinguished_name = dn

[ dn ]
C = "  "
ST = " "
L = " "
O = " "
OU = " " 
CN = HELMSERVER

[ req_ext ]
subjectAltName = @alt_names

[ alt_names ]
IP.1 = 127.0.0.1

[ v3_ext ]
subjectAltName = @alt_names

csr.conf file

[ req ]
default_bits = 4096
prompt = no
default_md = sha256
req_extensions = req_ext
distinguished_name = dn

[ dn ]
C = "  "
ST = " "
L = " "
O = " "
OU = " " 
CN = HELMCLIENT

[ req_ext ]
subjectAltName = @alt_names

[ alt_names ]
IP.1 = 127.0.0.1

[ v3_ext ]
subjectAltName = @alt_names

commands:

$ openssl req -x509 -newkey rsa:4096 -keyout ca.key -out ca.crt -days 365 -nodes -subj "/C=  /ST= /L= /O= /CN=HELMSERVERCERTCA"

$ openssl req -newkey rsa:4096 -nodes -keyout test_key.key -out test_key.csr -subj "/C=  /ST= /L= /O= /CN=HELMSERVER" -config server-csr.conf

$ openssl x509 -req -in test_key.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out test_cert.crt -days 365 -extensions v3_ext -extfile server-csr.conf

$ openssl req -x509 -newkey rsa:4096 -keyout server_ca.key -out server_ca.crt -days 365 -nodes -subj "/C=  /ST= /L= /O= /CN=HELMCLIENTCERTCA"

$ openssl req -newkey rsa:4096 -nodes -keyout test_server.key -out test_server.csr -subj "/C=  /ST= /L= /O= /CN=HELMCLIENT" -config csr.conf

$ openssl x509 -req -in test_server.csr -CA server_ca.crt -CAkey server_ca.key -CAcreateserial -out test_server.crt -days 365 -extfile csr.conf

@jdolitsky
Copy link
Contributor

👏 thank you! opened #45 for documenting this process

@jdolitsky jdolitsky merged commit fa5ac46 into chartmuseum:master Dec 9, 2019
@jdolitsky jdolitsky mentioned this pull request Dec 9, 2019
@karuppiah7890 karuppiah7890 deleted the update-certs branch December 9, 2019 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants