Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
labs
jetconf
Commits
356c2f41
Commit
356c2f41
authored
Feb 22, 2019
by
Ladislav Lhotka
Browse files
Use full email address for client certificates
parent
c2050bf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/cert_gen/gen_client_cert.sh
View file @
356c2f41
#!/bin/sh
if
[
"
$1
"
=
""
]
;
then
echo
"Usage:"
$0
"
out_filename_prefix
"
echo
"Usage:"
$0
"
email_address
"
exit
1
fi
...
...
@@ -8,13 +8,13 @@ echo -e "\n1. Generating private key:"
openssl genrsa
-out
$1
.key 2048
echo
-e
"
\n
2. Generating CSR:"
openssl req
-new
-key
$1
.key
-out
$1
.req
-subj
"/CN=Test/emailAddress=
$1
@mail.cz
"
openssl req
-new
-key
$1
.key
-out
$1
.req
-subj
"/CN=Test/emailAddress=
$1
"
echo
-e
"
\n
3. Signing CSR with test CA's key:"
openssl x509
-req
-in
$1
.req
-CAcreateserial
-CA
ca.pem
-CAkey
ca.key
-days
3650
-out
$1
.pem
rm
$1
.req
echo
-e
"
\n
4. Creating
$1_curl
.pem (
concaterated
certificate
and
key
for curl etc.
):"
echo
-e
"
\n
4. Creating
$1_curl
.pem (certificate
&
key):"
cat
$1
.pem
>
$1_curl
.pem
cat
$1
.key
>>
$1_curl
.pem
...
...
Write
Preview
Supports
Markdown
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