keystate.h 1.14 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
/*  Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
14
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
15 16 17 18
*/

#pragma once

19
#include "contrib/time.h"
20
#include "knot/dnssec/kasp/policy.h"
21

22
typedef enum {
23
	DNSSEC_KEY_STATE_INVALID = 0,
24
	DNSSEC_KEY_STATE_PRE_ACTIVE,
25
	DNSSEC_KEY_STATE_PUBLISHED,
26
	DNSSEC_KEY_STATE_READY,
27
	DNSSEC_KEY_STATE_ACTIVE,
28
	DNSSEC_KEY_STATE_RETIRE_ACTIVE,
29
	DNSSEC_KEY_STATE_RETIRED,
30
	DNSSEC_KEY_STATE_POST_ACTIVE,
31
	DNSSEC_KEY_STATE_REMOVED,
32
} key_state_t;
33

34
key_state_t get_key_state(const knot_kasp_key_t *key, knot_time_t moment);