From 7f4f066a859850e551fa60d546ac9d8b5acd450b Mon Sep 17 00:00:00 2001 From: Brooke Date: Mon, 1 Aug 2022 14:21:49 -0700 Subject: [PATCH 1/2] PROD-2738 #comment add a readme and make the cert last longer #time 30m --- ssl/README.md | 73 +++++++++++++++++++++++++++++++++++++++++++++++++ ssl/cert.conf | 9 ++++++ ssl/csr.conf | 14 ++++++++++ ssl/rootCA.crt | 18 ++++++++++++ ssl/rootCA.key | 28 +++++++++++++++++++ ssl/rootCA.srl | 1 + ssl/server.cert | 20 -------------- ssl/server.crt | 23 ++++++++++++++++ ssl/server.csr | 17 ++++++++++++ ssl/server.key | 55 ++++++++++++++++++------------------- start-ssl.sh | 2 +- 11 files changed, 211 insertions(+), 49 deletions(-) create mode 100644 ssl/README.md create mode 100644 ssl/cert.conf create mode 100644 ssl/csr.conf create mode 100644 ssl/rootCA.crt create mode 100644 ssl/rootCA.key create mode 100644 ssl/rootCA.srl delete mode 100644 ssl/server.cert create mode 100644 ssl/server.crt create mode 100644 ssl/server.csr diff --git a/ssl/README.md b/ssl/README.md new file mode 100644 index 000000000..d4b9b8246 --- /dev/null +++ b/ssl/README.md @@ -0,0 +1,73 @@ +# Instructions for Creating a Self-Signed Cert + +These are based off: +(https://devopscube.com/create-self-signed-certificates-openssl/)[https://devopscube.com/create-self-signed-certificates-openssl/] + +## Create the Certificate Authority + +``` +openssl req -x509 \ + -sha256 -days 356 \ + -nodes \ + -newkey rsa:2048 \ + -subj "/CN=*.topcoder-dev.com/C=US/L=Los Angeles" \ + -keyout rootCA.key -out rootCA.crt +``` + +## Create the Server Private Key + +``` +openssl genrsa -out server.key 2048 +``` + +## Create Cert Signing Request Config + +``` +cat > csr.conf < cert.conf < Date: Mon, 1 Aug 2022 14:24:42 -0700 Subject: [PATCH 2/2] PROD-2738 #comment improve readme #time 5m --- ssl/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ssl/README.md b/ssl/README.md index d4b9b8246..45c261e20 100644 --- a/ssl/README.md +++ b/ssl/README.md @@ -71,3 +71,7 @@ openssl x509 -req \ -days 365 \ -sha256 -extfile cert.conf ``` + +## Add the new RootCA cert as trusted in your browser + +Each OS/Browser combo has a different way to import a root cert authority, so you'll need to Google it.