Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
ssl-ca
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
ssl-ca
Commits
1fee4498
Commit
1fee4498
authored
9 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
init now creates the key and cert in 2 steps, skipping any file that already exists.
parent
eb7def43
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
ssl-ca
+29
-14
29 additions, 14 deletions
ssl-ca
with
30 additions
and
15 deletions
Makefile
+
1
−
1
View file @
1fee4498
...
@@ -5,7 +5,7 @@ install:
...
@@ -5,7 +5,7 @@ install:
chmod
755 /usr/local/bin/ssl-ca
chmod
755 /usr/local/bin/ssl-ca
clean
:
clean
:
rm
-rf
openssl.cnf certs keys CA.key CA.crt
rm
-rf
openssl.cnf certs keys CA.key CA.crt
CA.p12
test
:
clean
test
:
clean
./ssl-ca init
./ssl-ca init
...
...
This diff is collapsed.
Click to expand it.
ssl-ca
+
29
−
14
View file @
1fee4498
...
@@ -59,20 +59,35 @@ init () {
...
@@ -59,20 +59,35 @@ init () {
else
else
echo
"
$config
"
>
"openssl.cnf"
echo
"
$config
"
>
"openssl.cnf"
fi
fi
openssl req
\
if
[
-e
CA.key
]
-x509
\
then
-config
openssl.cnf
\
echo
CA.key already exists, skipping.
-new
\
else
-newkey
rsa:2048
\
openssl genrsa
-out
CA.key 2048
-keyout
CA.key
\
fi
-extensions
v3_ca
\
if
[
-e
CA.crt
]
-out
CA.crt
then
openssl pkcs12
\
echo
CA.crt already exists, skipping.
-export
\
else
-in
CA.crt
\
openssl req
\
-inkey
CA.key
\
-x509
\
-out
CA.p12
\
-config
openssl.cnf
\
-passout
pass:
-new
\
-key
CA.key
\
-extensions
v3_ca
\
-out
CA.crt
fi
if
[
-e
CA.p12
]
then
echo
PKCS12 file already exists, skipping.
else
openssl pkcs12
\
-export
\
-in
CA.crt
\
-inkey
CA.key
\
-out
CA.p12
\
-passout
pass:
fi
}
}
sign_key
()
{
sign_key
()
{
...
...
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