mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 15:45:25 +00:00
[master] fix keymgr with low prepublication interval
4417. [bug] dnssec-keymgr could fail to create successor keys if the prepublication interval was set to a value smaller than the default. [RT #42820] Patch submitted by Nis Wechselberg (enbewe@enbewe.de).
This commit is contained in:
@@ -205,7 +205,7 @@ class dnskey:
|
||||
except Exception as e:
|
||||
raise Exception('unable to parse generated key: %s' % str(e))
|
||||
|
||||
def generate_successor(self, keygen_bin, randomdev, **kwargs):
|
||||
def generate_successor(self, keygen_bin, randomdev, prepublish, **kwargs):
|
||||
quiet = kwargs.get('quiet', False)
|
||||
|
||||
if not self.inactive():
|
||||
@@ -219,6 +219,9 @@ class dnskey:
|
||||
if randomdev:
|
||||
keygen_cmd += ["-r", randomdev]
|
||||
|
||||
if prepublish:
|
||||
keygen_cmd += ["-i", str(prepublish)]
|
||||
|
||||
if not quiet:
|
||||
print('# ' + ' '.join(keygen_cmd))
|
||||
|
||||
|
@@ -123,7 +123,7 @@ class keyseries:
|
||||
prev.commit(self._context['settime_path'], **kwargs)
|
||||
key = prev.generate_successor(self._context['keygen_path'],
|
||||
self._context['randomdev'],
|
||||
**kwargs)
|
||||
prepub, **kwargs)
|
||||
|
||||
key.setinactive(key.activate() + rp, **kwargs)
|
||||
key.setdelete(key.inactive() + postpub, **kwargs)
|
||||
|
Reference in New Issue
Block a user