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
d6ce8823
Commit
d6ce8823
authored
Jan 09, 2016
by
Lukas Schauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
call mktemp with `-t XXXXXX` for compatibility with older BSD versions
parent
20a8169a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
letsencrypt.sh
letsencrypt.sh
+4
-4
No files found.
letsencrypt.sh
View file @
d6ce8823
...
...
@@ -14,7 +14,7 @@ check_dependencies() {
openssl version
>
/dev/null 2>&1
||
_exiterr
"This script requres an openssl binary."
sed
""
< /dev/null
>
/dev/null 2>&1
||
_exiterr
"This script requres sed."
grep
-V
>
/dev/null 2>&1
||
_exiterr
"This script requres grep."
mktemp
-u
>
/dev/null 2>&1
||
_exiterr
"This script requires mktemp."
mktemp
-u
-t
XXXXXX
>
/dev/null 2>&1
||
_exiterr
"This script requires mktemp."
}
# Setup default config values, search for and load configuration files
...
...
@@ -171,7 +171,7 @@ _openssl() {
# Send http(s) request with specified method
http_request
()
{
tempcont
=
"
$(
mktemp
)
"
tempcont
=
"
$(
mktemp
-t
XXXXXX
)
"
if
[[
"
${
1
}
"
=
"head"
]]
;
then
statuscode
=
"
$(
curl
-s
-w
"%{http_code}"
-o
"
${
tempcont
}
"
"
${
2
}
"
-I
)
"
...
...
@@ -261,7 +261,7 @@ sign_domain() {
done
SAN
=
"
${
SAN
%%,
}
"
local
tmp_openssl_cnf
tmp_openssl_cnf
=
"
$(
mktemp
)
"
tmp_openssl_cnf
=
"
$(
mktemp
-t
XXXXXX
)
"
cat
"
${
OPENSSL_CNF
}
"
>
"
${
tmp_openssl_cnf
}
"
printf
"[SAN]
\n
subjectAltName=%s"
"
${
SAN
}
"
>>
"
${
tmp_openssl_cnf
}
"
openssl req
-new
-sha256
-key
"
${
BASEDIR
}
/certs/
${
domain
}
/
${
privkey
}
"
-out
"
${
BASEDIR
}
/certs/
${
domain
}
/cert-
${
timestamp
}
.csr"
-subj
"/CN=
${
domain
}
/"
-reqexts
SAN
-config
"
${
tmp_openssl_cnf
}
"
...
...
@@ -368,7 +368,7 @@ command_sign_domains() {
init_system
if
[[
-n
"
${
PARAM_DOMAIN
:-}
"
]]
;
then
DOMAINS_TXT
=
"
$(
mktemp
)
"
DOMAINS_TXT
=
"
$(
mktemp
-t
XXXXXX
)
"
printf
--
"
${
PARAM_DOMAIN
}
"
>
"
${
DOMAINS_TXT
}
"
elif
[[
-e
"
${
BASEDIR
}
/domains.txt"
]]
;
then
DOMAINS_TXT
=
"
${
BASEDIR
}
/domains.txt"
...
...
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