-
Notifications
You must be signed in to change notification settings - Fork 179
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
Generate self signed certificate #97
Generate self signed certificate #97
Conversation
KEY_PATH="${SCRIPTS_DIR}/key.pem" | ||
CERT_PATH="${SCRIPTS_DIR}/cert.pem" | ||
|
||
openssl req -x509 -newkey rsa:4096 -keyout ${KEY_PATH} -out ${CERT_PATH} -days 365 -subj "/CN=${DOMAIN}" -nodes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 365 days?
|
||
echo "TLS_CERT=${TLS_CERT}" | ||
echo "TLS_KEY=${TLS_KEY}" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a comment that explains how this script be used, why we are removing files above etc
KEY_PATH="${SCRIPTS_DIR}/key.pem" | ||
CERT_PATH="${SCRIPTS_DIR}/cert.pem" | ||
|
||
openssl req -x509 -newkey rsa:4096 -keyout ${KEY_PATH} -out ${CERT_PATH} -days 5 -subj "/CN=${DOMAIN}" -nodes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The certificate doesn't have SAN. Will not work. You need something like this:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-subj "/C=/ST=/O=/localityName=/commonName=$DOMAIN/organizationalUnitName=/emailAddress=/" \
-reqexts SAN -extensions SAN \
-config <(cat /etc/ssl/openssl.cnf \
<(printf "\n[SAN]\nsubjectAltName=DNS:*.$DOMAIN")) \
-keyout server.key \
-out server.crt
Description
Changes proposed in this pull request:
Related issue(s)
Provisioning GKE cluster for integration tests #20