1 /*
2   chronyd/chronyc - Programs for keeping computer clocks accurate.
3 
4  **********************************************************************
5  * Copyright (C) Miroslav Lichvar  2020
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of version 2 of the GNU General Public License as
9  * published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19  *
20  **********************************************************************
21 
22   =======================================================================
23 
24   Header file for the NTS-KE server
25   */
26 
27 #ifndef GOT_NTS_KE_SERVER_H
28 #define GOT_NTS_KE_SERVER_H
29 
30 #include "nts_ke.h"
31 
32 /* Init and fini functions */
33 extern void NKS_PreInitialise(uid_t uid, gid_t gid, int scfilter_level);
34 extern void NKS_Initialise(void);
35 extern void NKS_Finalise(void);
36 
37 /* Save the current server keys */
38 extern void NKS_DumpKeys(void);
39 
40 /* Reload the keys */
41 extern void NKS_ReloadKeys(void);
42 
43 /* Generate an NTS cookie with a given context */
44 extern int NKS_GenerateCookie(NKE_Context *context, NKE_Cookie *cookie);
45 
46 /* Validate a cookie and decode the context */
47 extern int NKS_DecodeCookie(NKE_Cookie *cookie, NKE_Context *context);
48 
49 #endif
50