Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bundle_certs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nimrod
bundle_certs
Commits
af02608f
Commit
af02608f
authored
7 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
- Fixup for the tests.
parent
da513479
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/bundle-certs.bats
+8
-8
8 additions, 8 deletions
tests/bundle-certs.bats
tests/openssl.cnf
+8
-0
8 additions, 0 deletions
tests/openssl.cnf
with
16 additions
and
8 deletions
tests/bundle-certs.bats
+
8
−
8
View file @
af02608f
...
...
@@ -5,22 +5,22 @@ setup () {
mkdir -p .testcerts
echo 1000 > .testcerts/serial
openssl genrsa -out .testcerts/root.key 4096
openssl req -new -x509 -days 7 -key .testcerts/root.key -nodes -out .testcerts/root.crt -subj /C=US/ST=State/L=City/O=RootCA/OU=Unit/CN=localhost/emailAddress=none@nowhere.com
openssl req
-config tests/openssl.cnf -extensions v3_ca -outform PEM
-new -x509 -days 7 -key .testcerts/root.key -nodes -out .testcerts/root.crt -subj /C=US/ST=State/L=City/O=RootCA/OU=Unit/CN=localhost/emailAddress=none@nowhere.com
openssl genrsa -out .testcerts/intermediate1.key 4096
openssl req -new -key .testcerts/intermediate1.key -out .testcerts/intermediate1.csr -subj /C=US/ST=State/L=City/O=FirstIntermediate/OU=Unit/CN=localhost/emailAddress=none@nowhere.com
openssl x509 -req -days 7 -in .testcerts/intermediate1.csr -out .testcerts/intermediate1.crt -CAkey .testcerts/root.key -CA .testcerts/root.crt -CAserial .testcerts/serial
openssl req
-config tests/openssl.cnf -extensions v3_ca
-new -key .testcerts/intermediate1.key -out .testcerts/intermediate1.csr -subj /C=US/ST=State/L=City/O=FirstIntermediate/OU=Unit/CN=localhost/emailAddress=none@nowhere.com
openssl x509
-extfile tests/openssl.cnf -extensions v3_ca -outform PEM
-req -days 7 -in .testcerts/intermediate1.csr -out .testcerts/intermediate1.crt -CAkey .testcerts/root.key -CA .testcerts/root.crt -CAserial .testcerts/serial
openssl genrsa -out .testcerts/intermediate2.key 4096
openssl req -new -key .testcerts/intermediate2.key -out .testcerts/intermediate2.csr -subj /C=US/ST=State/L=City/O=SecondIntermediate/OU=Unit/CN=localhost/emailAddress=none@nowhere.com
openssl x509 -req -days 7 -in .testcerts/intermediate2.csr -out .testcerts/intermediate2.crt -CAkey .testcerts/intermediate1.key -CA .testcerts/intermediate1.crt -CAserial .testcerts/serial
openssl req
-config tests/openssl.cnf -extensions v3_ca
-new -key .testcerts/intermediate2.key -out .testcerts/intermediate2.csr -subj /C=US/ST=State/L=City/O=SecondIntermediate/OU=Unit/CN=localhost/emailAddress=none@nowhere.com
openssl x509
-extfile tests/openssl.cnf -extensions v3_ca -outform PEM
-req -days 7 -in .testcerts/intermediate2.csr -out .testcerts/intermediate2.crt -CAkey .testcerts/intermediate1.key -CA .testcerts/intermediate1.crt -CAserial .testcerts/serial
openssl genrsa -out .testcerts/server.key 4096
openssl req -new -key .testcerts/server.key -out .testcerts/server.csr -subj /C=US/ST=State/L=City/O=Server/OU=Unit/CN=localhost/emailAddress=none@nowhere.com
openssl x509 -req -days 7 -in .testcerts/server.csr -out .testcerts/server.crt -CAkey .testcerts/intermediate2.key -CA .testcerts/intermediate2.crt -CAserial .testcerts/serial
openssl x509
-outform PEM
-req -days 7 -in .testcerts/server.csr -out .testcerts/server.crt -CAkey .testcerts/intermediate2.key -CA .testcerts/intermediate2.crt -CAserial .testcerts/serial
cat .testcerts/intermediate1.crt .testcerts/intermediate2.crt > .testcerts/intermediates.crt
}
teardown () {
[ -f .server.pid ] && [ -d "/proc/$$(cat .server.pid)" ] &&
kill "$(cat .server.pid)" || true
#
git clean -fdX
kill "$(cat .server.pid)" || true
git clean -fdX
}
server_test () {
...
...
This diff is collapsed.
Click to expand it.
tests/openssl.cnf
0 → 100644
+
8
−
0
View file @
af02608f
[ req ]
distinguished_name = req_distinguished_name
[ req_distinguished_name]
[ v3_ca ]
basicConstraints = critical, CA:true
keyUsage = keyCertSign, cRLSign
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment