Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
letsencrypt.sh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
letsencrypt.sh
Commits
620c7eb2
Commit
620c7eb2
authored
May 26, 2016
by
Lukas Schauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output CA cert for signcsr command (fixes #150)
parent
4e8f944b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
letsencrypt.sh
letsencrypt.sh
+22
-1
No files found.
letsencrypt.sh
View file @
620c7eb2
...
...
@@ -667,7 +667,28 @@ command_sign_csr() {
_exiterr
"Could not read certificate signing request
${
csrfile
}
"
fi
sign_csr
"
$(
<
"
${
csrfile
}
"
)
"
# gen cert
certfile
=
"
$(
_mktemp
)
"
sign_csr
"
$(
<
"
${
csrfile
}
"
)
"
3>
"
${
certfile
}
"
# get and convert ca cert
chainfile
=
"
$(
_mktemp
)
"
http_request get
"
$(
openssl x509
-in
"
${
certfile
}
"
-noout
-text
|
grep
'CA Issuers - URI:'
|
cut
-d
':'
-f2-
)
"
>
"
${
chainfile
}
"
if
!
grep
-q
"BEGIN CERTIFICATE"
"
${
chainfile
}
"
;
then
openssl x509
-inform
DER
-in
"
${
chainfile
}
"
-outform
PEM
-out
"
${
chainfile
}
"
fi
# output full chain
echo
"# CERT #"
>
&3
cat
"
${
certfile
}
"
>
&3
echo
>
&3
echo
"# CHAIN #"
>
&3
cat
"
${
chainfile
}
"
>
&3
# cleanup
rm
"
${
certfile
}
"
rm
"
${
chainfile
}
"
exit
0
}
...
...
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