Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
89956b3d
Commit
89956b3d
authored
6 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Added some file.open/create failure handling/logging - just in case.
parent
ed9bc542
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/letsyncrypt.js
+14
-7
14 additions, 7 deletions
exec/letsyncrypt.js
with
14 additions
and
7 deletions
exec/letsyncrypt.js
+
14
−
7
View file @
89956b3d
...
...
@@ -88,16 +88,23 @@ function authorize_order(acme, order, webroots)
if
(
!
mkpath
(
webroots
[
i
]
+
"
.well-known/acme-challenge
"
))
throw
(
"
Unable to create
"
+
webroots
[
i
]
+
"
.well-known/acme-challenge
"
);
tmp
=
new
File
(
webroots
[
i
]
+
"
.well-known/acme-challenge/webctrl.ini
"
);
tmp
.
open
(
"
w
"
);
tmp
.
writeln
(
"
AccessRequirements=
"
);
tmp
.
close
();
if
(
tmp
.
open
(
"
w
"
))
{
tmp
.
writeln
(
"
AccessRequirements=
"
);
tmp
.
close
();
}
else
log
(
LOG_ERR
,
"
Error
"
+
errno
+
"
opening/creating
"
+
tmp
.
name
);
}
token
=
new
File
(
webroots
[
i
]
+
"
.well-known/acme-challenge/
"
+
authz
.
challenges
[
challenge
].
token
);
if
(
tokens
.
indexOf
(
token
.
name
)
<
0
)
{
token
.
open
(
"
w
"
);
token
.
write
(
authz
.
challenges
[
challenge
].
token
+
"
.
"
+
acme
.
thumbprint
());
tokens
.
push
(
token
.
name
);
token
.
close
();
log
(
LOG_DEBUG
,
"
Creating
"
+
token
.
name
);
if
(
token
.
open
(
"
w
"
))
{
token
.
write
(
authz
.
challenges
[
challenge
].
token
+
"
.
"
+
acme
.
thumbprint
());
tokens
.
push
(
token
.
name
);
token
.
close
();
}
else
log
(
LOG_ERR
,
"
Error
"
+
errno
+
"
opening/creating
"
+
token
.
name
);
}
else
{
log
(
LOG_WARNING
,
"
Token not found:
"
+
token
.
name
);
}
}
acme
.
accept_challenge
(
authz
.
challenges
[
challenge
]);
...
...
This diff is collapsed.
Click to expand it.
Deucе
@Deuce
mentioned in commit
e2e83629
·
4 years ago
mentioned in commit
e2e83629
mentioned in commit e2e83629384d7540eda63a05ba6377a4c0444dda
Toggle commit list
Deucе
@Deuce
mentioned in commit
7adbe0e9
·
11 months ago
mentioned in commit
7adbe0e9
mentioned in commit 7adbe0e9222fc334fb7f8042a6e73368d909d9f8
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment