Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Raymond Kristiansen
ca_setup
Commits
74e6a1c3
Commit
74e6a1c3
authored
Dec 19, 2016
by
Raymond Kristiansen
Browse files
Updated cert generation script to run with batch
parent
fb7ce75d
Changes
1
Hide whitespace changes
Inline
Side-by-side
gen_server_cert.sh
View file @
74e6a1c3
...
@@ -11,15 +11,27 @@ cnf="cnf/${host}.cnf"
...
@@ -11,15 +11,27 @@ cnf="cnf/${host}.cnf"
if
[
-f
"cnf/
${
host
}
.cnf"
]
;
then
if
[
-f
"cnf/
${
host
}
.cnf"
]
;
then
cnf
=
"cnf/
${
host
}
.cnf"
cnf
=
"cnf/
${
host
}
.cnf"
else
else
cnf
=
"intermediate/openssl.cnf"
echo
"[ req ]
default_bits = 2048
prompt = no
encrypt_key = no
default_md = sha256
distinguished_name = dn
utf8 = yes
[ dn ]
C = NO
O = My Org
CN =
${
host
}
"
>
cnf/
${
host
}
.cnf
cnf
=
"cnf/
${
host
}
.cnf"
fi
fi
echo
"Using
${
cnf
}
as config file"
echo
"Using
${
cnf
}
as config file"
openssl genrsa
-out
intermediate/private/
${
host
}
.key.pem 2048
openssl genrsa
-out
intermediate/private/
${
host
}
.key.pem 2048
openssl req
-config
${
cnf
}
-batch
-key
intermediate/private/
${
host
}
.key.pem
-new
-sha256
-out
intermediate/csr/
${
host
}
.csr.pem
openssl req
-config
${
cnf
}
-key
intermediate/private/
${
host
}
.key.pem
-new
-sha256
-out
intermediate/csr/
${
host
}
.csr.pem
openssl ca
-config
intermediate/openssl.cnf
-extensions
v3_req
\
openssl ca
-config
intermediate/openssl.cnf
-extensions
v3_req
\
-days
375
-notext
-md
sha256
-in
intermediate/csr/
${
host
}
.csr.pem
\
-days
375
-notext
-md
sha256
-in
intermediate/csr/
${
host
}
.csr.pem
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment