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
831b973a
Commit
831b973a
authored
Dec 06, 2015
by
Lukas Schauer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11 from germeier/fixpending
fixed logic to check status from our challenge
parents
3390080c
76a37834
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
letsencrypt.sh
letsencrypt.sh
+9
-6
No files found.
letsencrypt.sh
View file @
831b973a
...
@@ -144,17 +144,20 @@ sign_domain() {
...
@@ -144,17 +144,20 @@ sign_domain() {
result
=
"
$(
signed_request
"
${
challenge_uri
}
"
'{"resource": "challenge", "keyAuthorization": "'
"
${
keyauth
}
"
'"}'
)
"
result
=
"
$(
signed_request
"
${
challenge_uri
}
"
'{"resource": "challenge", "keyAuthorization": "'
"
${
keyauth
}
"
'"}'
)
"
status
=
"
$(
printf
'%s\n'
"
${
result
}
"
|
grep
-Eo
'"status":\s*"[^"]*"'
|
cut
-d
'"'
-f4
)
"
status
=
"
$(
printf
'%s\n'
"
${
result
}
"
|
grep
-Eo
'"status":\s*"[^"]*"'
|
cut
-d
'"'
-f4
)
"
if
[[
!
"
${
status
}
"
=
"pending"
]]
&&
[[
!
"
${
status
}
"
=
"valid"
]]
;
then
echo
" + Challenge is invalid! (
${
result
}
)"
exit
1
fi
# get status until it a result is reached => not pending anymore
while
[[
"
${
status
}
"
=
"pending"
]]
;
do
while
[[
"
${
status
}
"
=
"pending"
]]
;
do
status
=
"
$(
_request get
"
${
challenge_uri
}
"
|
grep
-Eo
'"status":\s*"[^"]*"'
|
cut
-d
'"'
-f4
)
"
sleep
1
sleep
1
status
=
"
$(
_request get
"
${
challenge_uri
}
"
|
grep
-Eo
'"status":\s*"[^"]*"'
|
cut
-d
'"'
-f4
)
"
done
done
echo
" + Challenge is valid!"
if
[[
"
${
status
}
"
=
"valid"
]]
;
then
echo
" + Challenge is valid!"
else
echo
" + Challenge is invalid! (returned:
${
status
}
)"
exit
1
fi
done
done
# Finally request certificate from the acme-server and store it in cert-${timestamp}.pem and link from cert.pem
# Finally request certificate from the acme-server and store it in cert-${timestamp}.pem and link from cert.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