You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ap...@apache.org on 2021/01/05 22:01:41 UTC

[incubator-pinot] 04/07: generate localhost cert

This is an automated email from the ASF dual-hosted git repository.

apucher pushed a commit to branch pinot-broker-https-discussion
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 5787625712b4cfd75372b38228cd79b8c89292b9
Author: Alexander Pucher <al...@alexpucher.com>
AuthorDate: Tue Jan 5 11:00:57 2021 -0800

    generate localhost cert
---
 create-certs.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/create-certs.sh b/create-certs.sh
index 2161e22..1cc8a86 100755
--- a/create-certs.sh
+++ b/create-certs.sh
@@ -18,7 +18,7 @@
 #
 
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-DOMAIN="192.168.64.82.xip.io"
+DOMAIN="localhost"
 
 KEY_DIR="$DIR/truststore"
 
@@ -32,10 +32,10 @@ openssl req -x509 -newkey rsa:4096 -days 365 -nodes -keyout "$KEY_DIR/ca-key.pem
 #openssl x509 -in "$KEY_DIR/ca-cert.pem" -noout -text
 
 echo "2. Generate web server's private key and certificate signing request (CSR)"
-openssl req -newkey rsa:4096 -nodes -keyout "$KEY_DIR/key.pem" -out "$KEY_DIR/req.pem" -subj "/C=US/ST=Someplace/L=Somewhere/O=Apache Pinot/OU=Education/CN=*.$DOMAIN/emailAddress=admin@example.com"
+openssl req -newkey rsa:4096 -nodes -keyout "$KEY_DIR/key.pem" -out "$KEY_DIR/req.pem" -subj "/C=US/ST=Someplace/L=Somewhere/O=Apache Pinot/OU=Education/CN=$DOMAIN/emailAddress=admin@example.com"
 
 echo "3. Use CA's private key to sign web server's CSR and get back the signed certificate"
-echo "subjectAltName=DNS:*.$DOMAIN,IP:0.0.0.0" > "$KEY_DIR/ext.cnf"
+echo "subjectAltName=DNS:$DOMAIN,IP:0.0.0.0" > "$KEY_DIR/ext.cnf"
 openssl x509 -req -in "$KEY_DIR/req.pem" -days 60 -CA "$KEY_DIR/ca-cert.pem" -CAkey "$KEY_DIR/ca-key.pem" -CAcreateserial -out "$KEY_DIR/cert.pem" -extfile "$KEY_DIR/ext.cnf"
 
 #echo "Server's signed certificate"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org