northox / dnssec-reverb

Automate DNSSEC key rotation for both ZSK KSK
Other
26 stars 10 forks source link

`Keygen` option can't be used for a new domain #20

Closed tlaguz closed 3 years ago

tlaguz commented 3 years ago

Hi,

for a new domain:

ns1# dnssec-reverb keygen example.com
dnssec-reverb: zone does not exist

The issue seems to be here: https://github.com/northox/dnssec-reverb/blob/6fbb2976baa95240200207d2ef75125ba8cd956b/dnssec-reverb#L273

If I understand correctly this file does not exist yet and keygen option would create one.

Is this check necessary? It looks like some of the options check for files existence on their own. Or alternatively:

        if [ ! -s "$KSK_CUR_FILE" ] && [[ $CMD != "keygen" ]]; then
                Fatal "zone does not exist"
        fi
northox commented 3 years ago

Hello, you're right. Also, I'll make sure to have a script to test functions I dont use quite often to avoid this. Thanks for reporting I'll take a look by the end of the day.

tlaguz commented 3 years ago

Fixed in b742301d8ba8f61fd47b01011acc713796854e34. Thanks!