Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
b5626079
Commit
b5626079
authored
Dec 26, 2015
by
neil
Browse files
typo
parent
00e16350
Changes
1
Hide whitespace changes
Inline
Side-by-side
le.sh
View file @
b5626079
...
...
@@ -321,7 +321,7 @@ issue() {
fi
# verify each domain
_info
"
v
erify each domain"
_info
"
V
erify each domain"
alldomains
=
$(
echo
"
$Le_Domain
,
$Le_Alt
"
|
sed
"s/,/ /g"
)
for
d
in
$alldomains
...
...
@@ -371,34 +371,34 @@ issue() {
_debug
"checking"
if
!
_get
$uri
;
then
_info
"
v
erify error:
$d
"
_info
"
V
erify error:
$d
"
return
1
fi
status
=
$(
echo
$response
| egrep
-o
'"status":"[^"]+"'
|
cut
-d
:
-f
2 |
sed
's/"//g'
)
if
[
"
$status
"
==
"valid"
]
;
then
_info
"
v
erify success:
$d
"
_info
"
V
erify success:
$d
"
break
;
fi
if
[
"
$status
"
==
"invalid"
]
;
then
error
=
$(
echo
$response
| egrep
-o
'"error":{[^}]*}'
|
grep
-o
'"detail":"[^"]*"'
|
cut
-d
'"'
-f
4
)
_info
"
v
erify error:
$d
"
_info
"
V
erify error:
$d
"
_debug
$error
return
1
;
fi
if
[
"
$status
"
==
"pending"
]
;
then
_info
"
v
erify pending:
$d
"
_info
"
V
erify pending:
$d
"
else
_info
"
v
erify error:
$d
"
_info
"
V
erify error:
$d
"
return
1
fi
done
done
_info
"
v
erify finished, start to sign."
_info
"
V
erify finished, start to sign."
der
=
$(
openssl req
-in
$CSR_PATH
-outform
DER |
base64
| _b64
)
_send_signed_request
"
$API
/acme/new-cert"
"{
\"
resource
\"
:
\"
new-cert
\"
,
\"
csr
\"
:
\"
$der
\"
}"
"needbas64"
...
...
@@ -408,6 +408,8 @@ issue() {
_info
"Cert success."
cat
$CERT_PATH
_info
"Your cert is in
$CERT_PATH
"
_setopt
$DOMAIN_CONF
"Le_Domain"
"="
"
$Le_Domain
"
_setopt
$DOMAIN_CONF
"Le_Alt"
"="
"
$Le_Alt
"
_setopt
$DOMAIN_CONF
"Le_Webroot"
"="
"
$Le_Webroot
"
...
...
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