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
3dbbb461
Commit
3dbbb461
authored
Dec 06, 2015
by
Markus Germeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generate a new private key for each csr if the user wishes so
parent
831b973a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
config.sh.example
config.sh.example
+3
-0
letsencrypt.sh
letsencrypt.sh
+11
-2
No files found.
config.sh.example
View file @
3dbbb461
...
@@ -11,3 +11,6 @@
...
@@ -11,3 +11,6 @@
# try to renew certs that are within RENEW_DAYS days of there expire date
# try to renew certs that are within RENEW_DAYS days of there expire date
#RENEW_DAYS="14"
#RENEW_DAYS="14"
# create new private key for each csr (yes|no)
#PRIVATE_KEY_RENEW=no
letsencrypt.sh
View file @
3dbbb461
...
@@ -11,6 +11,7 @@ HOOK_CHALLENGE=
...
@@ -11,6 +11,7 @@ HOOK_CHALLENGE=
RENEW_DAYS
=
"14"
RENEW_DAYS
=
"14"
KEYSIZE
=
"4096"
KEYSIZE
=
"4096"
WELLKNOWN
=
".acme-challenges"
WELLKNOWN
=
".acme-challenges"
PRIVATE_KEY_RENEW
=
no
if
[[
-e
"config.sh"
]]
;
then
if
[[
-e
"config.sh"
]]
;
then
.
./config.sh
.
./config.sh
...
@@ -97,11 +98,19 @@ sign_domain() {
...
@@ -97,11 +98,19 @@ sign_domain() {
altnames
=
"
${
*
}
"
altnames
=
"
${
*
}
"
echo
"Signing domain
${
1
}
(
${
*
}
)..."
echo
"Signing domain
${
1
}
(
${
*
}
)..."
# If there is no existing certificate directory
we need a new private key
# If there is no existing certificate directory
=> make it
if
[[
!
-e
"certs/
${
domain
}
"
]]
;
then
if
[[
!
-e
"certs/
${
domain
}
"
]]
;
then
echo
" + make directory certs/
${
domain
}
..."
mkdir
-p
"certs/
${
domain
}
"
mkdir
-p
"certs/
${
domain
}
"
fi
# generate a new private key if we need or want one
if
[[
!
-f
"certs/
${
domain
}
/privkey.pem"
]]
||
[[
"
${
PRIVATE_KEY_RENEW
}
"
=
"yes"
]]
;
then
echo
" + Generating private key..."
echo
" + Generating private key..."
openssl genrsa
-out
"certs/
${
domain
}
/privkey.pem"
"
${
KEYSIZE
}
"
2> /dev/null
>
/dev/null
timestamp
=
"
$(
date
+%s
)
"
openssl genrsa
-out
"certs/
${
domain
}
/privkey-
${
timestamp
}
.pem"
"
${
KEYSIZE
}
"
2> /dev/null
>
/dev/null
rm
-f
"certs/
${
domain
}
/privkey.pem"
ln
-s
"privkey-
${
timestamp
}
.pem"
"certs/
${
domain
}
/privkey.pem"
fi
fi
# Generate signing request config and the actual signing request
# Generate signing request config and the actual signing request
...
...
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