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

test: update expired certs #2908

Merged
merged 1 commit into from Sep 28, 2023
Merged

test: update expired certs #2908

merged 1 commit into from Sep 28, 2023

Conversation

Trott
Copy link
Member

@Trott Trott commented Sep 28, 2023

Fixes #2907

@cclauss cclauss merged commit 5746691 into main Sep 28, 2023
22 checks passed
@cclauss cclauss deleted the certs branch September 28, 2023 05:56
lukekarrys pushed a commit that referenced this pull request Oct 27, 2023
@lukekarrys
Copy link
Member

@Trott any chance you could post the commands you used to generate the new certs? i'd like to put them in the testing docs for when this comes up again next year 😄

lukekarrys pushed a commit that referenced this pull request Oct 27, 2023
@Trott
Copy link
Member Author

Trott commented Oct 28, 2023

@Trott any chance you could post the commands you used to generate the new certs? i'd like to put them in the testing docs for when this comes up again next year 😄

In this PR, I created an entry that will be valid for about 10 years. (See -days 3650 in step 4.) I don't think there's anything stopping you or anyone else from creating one that's valid for 1000 years or something like that, though.

  1. openssl req -nodes -new -x509 -keyout server.key -out server.cert (leave all the interactive questions blank)
  2. Copy the ca.crt and ca.key entries in certs.js to files named ca.crt and ca.key
  3. openssl req -new -key server.key -out server.csr (specify "localhost" for the Common Name but leave all the other interactive questions blank)
  4. Create an empty file called localhost.ext
  5. openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -days 3650 -sha256 -extfile localhost.ext -out localhost.crt
  6. Replace the server.key entry in certs.js with the contents of the server.key file
  7. Replace the server.crt entry in certs.js with the contents of the localhost.crt file

@lukekarrys
Copy link
Member

@Trott thank you! and TIL about -days 3650

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests are failing due to expired cert
3 participants