Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bind-dnssec
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Valentin Samir
bind-dnssec
Commits
f3c38ffe
Commit
f3c38ffe
authored
Jun 18, 2017
by
Valentin Samir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Activate date may not be defined (specialy then renewing KSK)
parent
8d8665ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
routine.py
routine.py
+9
-3
No files found.
routine.py
View file @
f3c38ffe
...
...
@@ -153,9 +153,9 @@ class Zone(object):
if
ksk
.
need_renew
:
now
=
datetime
.
datetime
.
utcnow
()
new_ksk
=
Key
.
create
(
"KSK"
,
self
.
name
)
new_ksk
.
publish
=
now
# do not activate the new key until ds-seen
new_ksk
.
activate
=
None
new_ksk
.
publish
=
now
bind_reload
()
active_ksk
=
[
key
for
key
in
self
.
KSK
if
key
.
is_publish
and
key
.
delete
is
None
]
if
len
(
active_ksk
)
>=
2
:
...
...
@@ -490,9 +490,15 @@ class Key(object):
@
property
def
need_renew
(
self
):
if
self
.
type
==
"KSK"
:
return
(
self
.
activate
+
KSK_VALIDITY
)
<=
(
datetime
.
datetime
.
utcnow
()
+
INTERVAL
)
return
(
self
.
activate
is
not
None
and
(
self
.
activate
+
KSK_VALIDITY
)
<=
(
datetime
.
datetime
.
utcnow
()
+
INTERVAL
)
)
elif
self
.
type
==
"ZSK"
:
return
(
self
.
activate
+
ZSK_VALIDITY
)
<=
(
datetime
.
datetime
.
utcnow
()
+
INTERVAL
)
return
(
self
.
activate
is
not
None
and
(
self
.
activate
+
ZSK_VALIDITY
)
<=
(
datetime
.
datetime
.
utcnow
()
+
INTERVAL
)
)
else
:
raise
RuntimeError
(
"impossible"
)
...
...
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