Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Daniel Kahn Gillmor
Knot DNS Resolver
Commits
32e1f331
Commit
32e1f331
authored
Jan 20, 2016
by
Marek Vavrusa
Browse files
daemon/trust_anchors: fixed root key fetch
parent
84976b1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
daemon/lua/trust_anchors.lua
View file @
32e1f331
...
@@ -52,7 +52,8 @@ if not ffi_ok then
...
@@ -52,7 +52,8 @@ if not ffi_ok then
if
not
io.open
(
path
,
'r'
)
then
if
not
io.open
(
path
,
'r'
)
then
local
rr
,
err
=
bootstrap
()
local
rr
,
err
=
bootstrap
()
if
not
rr
then
print
(
err
)
return
false
end
if
not
rr
then
print
(
err
)
return
false
end
io.open
(
path
,
'w'
):
write
(
rr
..
'
\n
'
)
local
keyfile
=
assert
(
io.open
(
path
,
'w'
))
keyfile
:
write
(
rr
..
'
\n
'
)
end
end
for
line
in
io.lines
(
path
)
do
for
line
in
io.lines
(
path
)
do
trustanchor
(
line
)
trustanchor
(
line
)
...
@@ -255,7 +256,6 @@ local trust_anchors = {
...
@@ -255,7 +256,6 @@ local trust_anchors = {
-- Bootstrap if requested and keyfile doesn't exist
-- Bootstrap if requested and keyfile doesn't exist
if
not
io.open
(
path
,
'r'
)
then
if
not
io.open
(
path
,
'r'
)
then
local
rr
,
msg
=
bootstrap
()
local
rr
,
msg
=
bootstrap
()
print
(
msg
)
if
not
rr
then
if
not
rr
then
error
(
'you MUST obtain the root TA manually, see: '
..
error
(
'you MUST obtain the root TA manually, see: '
..
'http://knot-resolver.readthedocs.org/en/latest/daemon.html#enabling-dnssec'
)
'http://knot-resolver.readthedocs.org/en/latest/daemon.html#enabling-dnssec'
)
...
...
modules/policy/zonefile.lua
View file @
32e1f331
...
@@ -175,7 +175,9 @@ local rrparser = {
...
@@ -175,7 +175,9 @@ local rrparser = {
file
=
function
(
path
)
file
=
function
(
path
)
local
zs
=
zs_scanner_t
()
local
zs
=
zs_scanner_t
()
local
ok
,
err
=
zs
:
open
(
path
)
local
ok
,
err
=
zs
:
open
(
path
)
if
not
ok
then
error
(
err
)
end
if
not
ok
then
return
ok
,
err
end
local
results
=
{}
local
results
=
{}
while
zs
:
parse
()
do
while
zs
:
parse
()
do
table.insert
(
results
,
zs
:
current_rr
())
table.insert
(
results
,
zs
:
current_rr
())
...
...
Write
Preview
Supports
Markdown
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