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
10cf2299
Commit
10cf2299
authored
Dec 08, 2015
by
Simon Ruderich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check certificate to detect corruption
parent
43b00611
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
letsencrypt.sh
letsencrypt.sh
+4
-1
No files found.
letsencrypt.sh
View file @
10cf2299
...
...
@@ -272,11 +272,14 @@ sign_domain() {
csr64
=
"
$(
openssl req
-in
"
${
BASEDIR
}
/certs/
${
domain
}
/cert-
${
timestamp
}
.csr"
-outform
DER | urlbase64
)
"
crt64
=
"
$(
signed_request
"
${
CA_NEW_CERT
}
"
'{"resource": "new-cert", "csr": "'
"
${
csr64
}
"
'"}'
| openssl
base64
-e
)
"
printf
--
'-----BEGIN CERTIFICATE-----\n%s\n-----END CERTIFICATE-----\n'
"
${
crt64
}
"
>
"
${
BASEDIR
}
/certs/
${
domain
}
/cert-
${
timestamp
}
.pem"
# try to load the certificate to detect corruption
echo
" + Checking certificate..."
>
&2
_openssl x509
-text
<
"
${
crt_path
}
"
# Create fullchain.pem
if
[[
-e
"
${
BASEDIR
}
/certs/
${
ROOTCERT
}
"
]]
||
[[
-e
"
${
SCRIPTDIR
}
/certs/
${
ROOTCERT
}
"
]]
;
then
echo
" + Creating fullchain.pem..."
cat
"
${
BASEDIR
}
/certs/
${
domain
}
/cert-
${
timestamp
}
.pem
"
>
"
${
BASEDIR
}
/certs/
${
domain
}
/fullchain-
${
timestamp
}
.pem"
cat
"
${
crt_path
}
"
>
"
${
BASEDIR
}
/certs/
${
domain
}
/fullchain-
${
timestamp
}
.pem"
if
[[
-e
"
${
BASEDIR
}
/certs/
${
ROOTCERT
}
"
]]
;
then
cat
"
${
BASEDIR
}
/certs/
${
ROOTCERT
}
"
>>
"
${
BASEDIR
}
/certs/
${
domain
}
/fullchain-
${
timestamp
}
.pem"
else
...
...
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