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
ea5b70a3
Commit
ea5b70a3
authored
Dec 08, 2015
by
et@corde.org
Committed by
Lukas Schauer
Dec 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add CONTACT_EMAIL option on registration
parent
12c566b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
config.sh.example
config.sh.example
+4
-0
letsencrypt.sh
letsencrypt.sh
+7
-1
No files found.
config.sh.example
View file @
ea5b70a3
...
...
@@ -17,3 +17,7 @@
# create new private key for each csr (yes|no)
#PRIVATE_KEY_RENEW=no
# email to use during the registration
#CONTACT_EMAIL=
letsencrypt.sh
View file @
ea5b70a3
...
...
@@ -16,6 +16,7 @@ SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BASEDIR
=
"
${
SCRIPTDIR
}
"
OPENSSL_CNF
=
"
$(
openssl version
-d
|
cut
-d
'"'
-f2
)
/openssl.cnf"
ROOTCERT
=
"lets-encrypt-x1-cross-signed.pem"
CONTACT_EMAIL
=
# If exists load config from same directory as this script
if
[[
-e
"
${
BASEDIR
}
/config.sh"
]]
;
then
...
...
@@ -250,7 +251,12 @@ thumbprint="$(printf '%s' "$(printf '%s' '{"e":"'"${pubExponent64}"'","kty":"RSA
# If we generated a new private key in the step above we have to register it with the acme-server
if
[[
"
${
register
}
"
=
"1"
]]
;
then
echo
"+ Registering account key with letsencrypt..."
signed_request
"
${
CA
}
/acme/new-reg"
'{"resource": "new-reg", "agreement": "'
"
$LICENSE
"
'"}'
>
/dev/null
# if an email for the contact has been provided then adding it to the registration request
if
[
-n
"
${
CONTACT_EMAIL
}
"
]
;
then
signed_request
"
${
CA
}
/acme/new-reg"
'{"resource": "new-reg", "contact":["mailto:'
"
${
CONTACT_EMAIL
}
"
'"], "agreement": "'
"
$LICENSE
"
'"}'
>
/dev/null
else
signed_request
"
${
CA
}
/acme/new-reg"
'{"resource": "new-reg", "agreement": "'
"
$LICENSE
"
'"}'
>
/dev/null
fi
fi
if
[[
-e
"
${
BASEDIR
}
/domains.txt"
]]
;
then
...
...
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