Skip to content

Commit

Permalink
feat: gencert script to regenerate the test ssl certs
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleytodd committed Jan 22, 2025
1 parent c9d0572 commit d1508c4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"test": "mocha --require test/support/env --check-leaks --bail --no-exit --reporter spec test/",
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc npm test",
"version": "node scripts/version-history.js && git add HISTORY.md"
"version": "node scripts/version-history.js && git add HISTORY.md",
"gencert": "./test/support/gencert.sh"
}
}
12 changes: 12 additions & 0 deletions test/support/gencert.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#! /bin/sh
set -ex

openssl genpkey -algorithm RSA -out new_server.key -pkeyopt rsa_keygen_bits:2048

openssl x509 -in ./test/fixtures/server.crt -signkey new_server.key -days 3650 -out new_server.crt

openssl x509 -in new_server.crt -text -noout

mv new_server.crt ./test/fixtures/server.crt

mv new_server.key ./test/fixtures/server.key

0 comments on commit d1508c4

Please sign in to comment.