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
2e55e0a9
Commit
2e55e0a9
authored
Mar 22, 2016
by
Lukas Schauer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #172 from bzed/master
Keep registration information as json.
parents
5c68c221
d1e573c0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
.gitignore
.gitignore
+1
-0
config.sh.example
config.sh.example
+3
-0
letsencrypt.sh
letsencrypt.sh
+4
-2
No files found.
.gitignore
View file @
2e55e0a9
private_key.pem
private_key.pem
private_key.json
domains.txt
domains.txt
config.sh
config.sh
hook.sh
hook.sh
...
...
config.sh.example
View file @
2e55e0a9
...
@@ -36,6 +36,9 @@
...
@@ -36,6 +36,9 @@
# Location of private account key (default: $BASEDIR/private_key.pem)
# Location of private account key (default: $BASEDIR/private_key.pem)
#PRIVATE_KEY="${BASEDIR}/private_key.pem"
#PRIVATE_KEY="${BASEDIR}/private_key.pem"
# Location of private account registration information (default: $BASEDIR/private_key.json)
#PRIVATE_KEY_JSON="${BASEDIR}/private_key.json"
# Default keysize for private keys (default: 4096)
# Default keysize for private keys (default: 4096)
#KEYSIZE="4096"
#KEYSIZE="4096"
...
...
letsencrypt.sh
View file @
2e55e0a9
...
@@ -60,6 +60,7 @@ load_config() {
...
@@ -60,6 +60,7 @@ load_config() {
HOOK_CHAIN
=
"no"
HOOK_CHAIN
=
"no"
RENEW_DAYS
=
"30"
RENEW_DAYS
=
"30"
PRIVATE_KEY
=
PRIVATE_KEY
=
PRIVATE_KEY_JSON
=
KEYSIZE
=
"4096"
KEYSIZE
=
"4096"
WELLKNOWN
=
WELLKNOWN
=
PRIVATE_KEY_RENEW
=
"no"
PRIVATE_KEY_RENEW
=
"no"
...
@@ -107,6 +108,7 @@ load_config() {
...
@@ -107,6 +108,7 @@ load_config() {
[[
-d
"
${
BASEDIR
}
"
]]
||
_exiterr
"BASEDIR does not exist:
${
BASEDIR
}
"
[[
-d
"
${
BASEDIR
}
"
]]
||
_exiterr
"BASEDIR does not exist:
${
BASEDIR
}
"
[[
-z
"
${
PRIVATE_KEY
}
"
]]
&&
PRIVATE_KEY
=
"
${
BASEDIR
}
/private_key.pem"
[[
-z
"
${
PRIVATE_KEY
}
"
]]
&&
PRIVATE_KEY
=
"
${
BASEDIR
}
/private_key.pem"
[[
-z
"
${
PRIVATE_KEY_JSON
}
"
]]
&&
PRIVATE_KEY_JSON
=
"
${
BASEDIR
}
/private_key.json"
[[
-z
"
${
WELLKNOWN
}
"
]]
&&
WELLKNOWN
=
"
${
BASEDIR
}
/.acme-challenges"
[[
-z
"
${
WELLKNOWN
}
"
]]
&&
WELLKNOWN
=
"
${
BASEDIR
}
/.acme-challenges"
[[
-z
"
${
LOCKFILE
}
"
]]
&&
LOCKFILE
=
"
${
BASEDIR
}
/lock"
[[
-z
"
${
LOCKFILE
}
"
]]
&&
LOCKFILE
=
"
${
BASEDIR
}
/lock"
...
@@ -172,9 +174,9 @@ init_system() {
...
@@ -172,9 +174,9 @@ init_system() {
[[
!
-z
"
${
CA_NEW_REG
}
"
]]
||
_exiterr
"Certificate authority doesn't allow registrations."
[[
!
-z
"
${
CA_NEW_REG
}
"
]]
||
_exiterr
"Certificate authority doesn't allow registrations."
# If an email for the contact has been provided then adding it to the registration request
# If an email for the contact has been provided then adding it to the registration request
if
[[
-n
"
${
CONTACT_EMAIL
}
"
]]
;
then
if
[[
-n
"
${
CONTACT_EMAIL
}
"
]]
;
then
signed_request
"
${
CA_NEW_REG
}
"
'{"resource": "new-reg", "contact":["mailto:'
"
${
CONTACT_EMAIL
}
"
'"], "agreement": "'
"
$LICENSE
"
'"}'
>
/dev/null
signed_request
"
${
CA_NEW_REG
}
"
'{"resource": "new-reg", "contact":["mailto:'
"
${
CONTACT_EMAIL
}
"
'"], "agreement": "'
"
$LICENSE
"
'"}'
>
"
${
PRIVATE_KEY_JSON
}
"
else
else
signed_request
"
${
CA_NEW_REG
}
"
'{"resource": "new-reg", "agreement": "'
"
$LICENSE
"
'"}'
>
/dev/null
signed_request
"
${
CA_NEW_REG
}
"
'{"resource": "new-reg", "agreement": "'
"
$LICENSE
"
'"}'
>
"
${
PRIVATE_KEY_JSON
}
"
fi
fi
fi
fi
...
...
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