forked from DawnAngel/lua-nats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
86 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Test features | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
runner-job: | ||
runs-on: ubuntu-latest | ||
services: | ||
nats: | ||
image: nats | ||
ports: | ||
- "4222:4222" | ||
steps: | ||
- name: Install Luarocks | ||
run: sudo apt-get update && sudo apt-get -y --no-install-recommends install luarocks | ||
- name: Install telescope | ||
run: sudo luarocks install telescope | ||
- name: Test Features | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
test: | ||
tsc -f tests/*.lua | ||
make -C tests certs test | ||
|
||
test-deps: | ||
luarocks install telescope | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
test: | ||
tsc -f *.lua | ||
|
||
certs: | ||
# Generate a new CA | ||
openssl req -new -x509 -days 1 -extensions v3_ca -keyout /tmp/ca.key -out /tmp/ca.pem -nodes -config configCA.conf | ||
# Generate a new server certificate request | ||
openssl req -new -newkey rsa:2048 -nodes -keyout /tmp/server.key -out /tmp/server.csr -config configServer.conf | ||
# Sign the server cert | ||
openssl x509 -req -days 1 -CA /tmp/ca.pem -CAkey /tmp/ca.key -CAcreateserial -in /tmp/server.csr -out /tmp/server.pem -extfile configServer.conf -extensions v3_req |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[req] | ||
default_bits = 2048 | ||
encrypt_key = no | ||
x509_extensions = custom_extensions | ||
prompt = no | ||
distinguished_name = distinguished_name | ||
|
||
[v3_ca] | ||
subjectKeyIdentifier = hash | ||
authorityKeyIdentifier = keyid:always,issuer:always | ||
basicConstraints = critical, CA:true | ||
|
||
[distinguished_name] | ||
CN = lua-nats TLS regression tests CA | ||
OU = PowerDNS.com BV | ||
countryName = NL | ||
|
||
[custom_extensions] | ||
basicConstraints = CA:true | ||
keyUsage = cRLSign, keyCertSign | ||
|
||
[CA_default] | ||
copy_extensions = copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[req] | ||
default_bits = 2048 | ||
encrypt_key = no | ||
prompt = no | ||
distinguished_name = server_distinguished_name | ||
req_extensions = v3_req | ||
|
||
[server_distinguished_name] | ||
CN = tls.tests.lua-nats.powerdns.com | ||
OU = PowerDNS.com BV | ||
countryName = NL | ||
|
||
[v3_req] | ||
basicConstraints = CA:FALSE | ||
keyUsage = nonRepudiation, digitalSignature, keyEncipherment | ||
subjectAltName = @alt_names | ||
|
||
[alt_names] | ||
DNS.1 = tls.tests.lua-nats.powerdns.com | ||
IP.2 = 127.0.0.1 |