From 1b5e91ab30b82b88d5aa0dadd62cab7689833597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rk=20Varga?= <27026978+Markcanfly@users.noreply.github.com> Date: Tue, 3 Oct 2023 09:47:36 +0200 Subject: [PATCH] Recreate tls certs (#41) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change removes the development certs checked in to the repo, I assume accidentally. Also adds the directory to the gitignore file so that this doesn't happen again. I also noticed that if you need to recreate the cert for whatever reason, mkcert doesn't overwrite the current certs. My current solution will delete the cert dir before recreating it, so that the certs get deleted, need feedback on this solution, as it may be dangerous if the job is ran from a path different from the project root ¯\\\_(ツ)\_/¯ --- .gitignore | 1 + cert/localhost.crt | 15 --------------- cert/localhost.key | 5 ----- package.json | 2 +- 4 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 cert/localhost.crt delete mode 100644 cert/localhost.key diff --git a/.gitignore b/.gitignore index bb5a519..01c8dd7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ node_modules/ .DS_Store tsconfig.tsbuildinfo **/.terraform +cert/ diff --git a/cert/localhost.crt b/cert/localhost.crt deleted file mode 100644 index 1a110c1..0000000 --- a/cert/localhost.crt +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICbDCCAhKgAwIBAgIQS8Vo/FiogdfkJxP3fnY7ljAKBggqhkjOPQQDAjCBoTEe -MBwGA1UEChMVbWtjZXJ0IGRldmVsb3BtZW50IENBMTswOQYDVQQLDDJraXhlbGF0 -ZWRAZGhjcC04ZDQ3Lm1lZXRpbmcuaWV0Zi5vcmcgKEx1a2UgQ3VybGV5KTFCMEAG -A1UEAww5bWtjZXJ0IGtpeGVsYXRlZEBkaGNwLThkNDcubWVldGluZy5pZXRmLm9y -ZyAoTHVrZSBDdXJsZXkpMB4XDTIzMDgyMjIxMDExOVoXDTI1MTEyMjIyMDExOVow -VjEnMCUGA1UEChMebWtjZXJ0IGRldmVsb3BtZW50IGNlcnRpZmljYXRlMSswKQYD -VQQLDCJraXhlbGF0ZWRAa2l4dG9wLmxhbiAoTHVrZSBDdXJsZXkpMFkwEwYHKoZI -zj0CAQYIKoZIzj0DAQcDQgAE95f6kWXP+HfEci+vINWrFHWxFPBY/3AsgbIjwb0F -ChFUNLNyEQwHSvbdkQjvYoDMt+qjDuea1lONNyqWovf1TaN2MHQwDgYDVR0PAQH/ -BAQDAgWgMBMGA1UdJQQMMAoGCCsGAQUFBwMBMB8GA1UdIwQYMBaAFPzsX7pQ0Y5Y -UNR3N/u/7UsUSDbAMCwGA1UdEQQlMCOCCWxvY2FsaG9zdIcEfwAAAYcQAAAAAAAA -AAAAAAAAAAAAATAKBggqhkjOPQQDAgNIADBFAiEA4opt9cO4cbGrfoC/ZxqOU+VP -M9Is3zlqBL1D/5aqufICIEPR7VlyHIBrJXrGwm9TRPDLo59R82k/Dvo89bzjhier ------END CERTIFICATE----- diff --git a/cert/localhost.key b/cert/localhost.key deleted file mode 100644 index 85889c6..0000000 --- a/cert/localhost.key +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgmFcuZ88k5QY2a2+9 -xH8tgfWIa8m5W43zWNgTt/PHXwGhRANCAAT3l/qRZc/4d8RyL68g1asUdbEU8Fj/ -cCyBsiPBvQUKEVQ0s3IRDAdK9t2RCO9igMy36qMO55rWU403Kpai9/VN ------END PRIVATE KEY----- diff --git a/package.json b/package.json index b8727c4..33d95a1 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "test": "tsc -b lib web", "release": "npm run release -w lib", "serve": "parcel serve --https --cert cert/localhost.crt --key cert/localhost.key --port 4444 --open", - "cert": "mkcert --install && mkdir cert && mkcert -ecdsa -cert-file cert/localhost.crt -key-file cert/localhost.key localhost 127.0.0.1 ::1", + "cert": "mkcert --install && rm -rf ./cert && mkdir cert && mkcert -ecdsa -cert-file cert/localhost.crt -key-file cert/localhost.key localhost 127.0.0.1 ::1", "clean": "rm -r ./.parcel-cache/ ./dist/" }, "workspaces": [