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
f574e581
Commit
f574e581
authored
Aug 02, 2016
by
neil
Browse files
add the new reg hash
parent
30684246
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
f574e581
...
...
@@ -1401,19 +1401,19 @@ issue() {
accountkey_json
=
$(
echo
-n
"
$jwk
"
|
tr
-d
' '
)
thumbprint
=
$(
echo
-n
"
$accountkey_json
"
| _digest
"sha256"
| _urlencode
)
regjson
=
'{"resource": "new-reg", "agreement": "'
$AGREEMENT
'"}'
if
[
"
$ACCOUNT_EMAIL
"
]
;
then
regjson
=
'{"resource": "new-reg", "contact": ["mailto: '
$ACCOUNT_EMAIL
'"], "agreement": "'
$AGREEMENT
'"}'
fi
accountkeyhash
=
"
$(
cat
"
$ACCOUNT_KEY_PATH
"
| _digest
"sha256"
)
"
accountkeyhash
=
"
$(
echo
$accountkeyhash$API
| _digest
"sha256"
)
"
accountkeyhash
=
"
$(
echo
$accountkeyhash$API
$regjson
| _digest
"sha256"
)
"
if
[
"
$accountkeyhash
"
!=
"
$ACCOUNT_KEY_HASH
"
]
;
then
_info
"Registering account"
regjson
=
'{"resource": "new-reg", "agreement": "'
$AGREEMENT
'"}'
if
[
"
$ACCOUNT_EMAIL
"
]
;
then
regjson
=
'{"resource": "new-reg", "contact": ["mailto: '
$ACCOUNT_EMAIL
'"], "agreement": "'
$AGREEMENT
'"}'
fi
_send_signed_request
"
$API
/acme/new-reg"
"
$regjson
"
_info
"Registering account"
_send_signed_request
"
$API
/acme/new-reg"
"
$regjson
"
if
[
"
$code
"
=
""
]
||
[
"
$code
"
=
'201'
]
;
then
_info
"Registered"
echo
$response
>
$LE_WORKING_DIR
/account.json
echo
"
$response
"
>
$LE_WORKING_DIR
/account.json
elif
[
"
$code
"
=
'409'
]
;
then
_info
"Already registered"
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