]> git.ipfire.org Git - thirdparty/chrony.git/blob - keys.h
conf: rework allow/deny parser
[thirdparty/chrony.git] / keys.h
1 /*
2 chronyd/chronyc - Programs for keeping computer clocks accurate.
3
4 **********************************************************************
5 * Copyright (C) Richard P. Curnow 1997-2002
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 for key management module
25 */
26
27 #ifndef GOT_KEYS_H
28 #define GOT_KEYS_H
29
30 #include "sysincl.h"
31
32 extern void KEY_Initialise(void);
33 extern void KEY_Finalise(void);
34
35 extern void KEY_Reload(void);
36
37 extern int KEY_KeyKnown(uint32_t key_id);
38 extern int KEY_GetAuthLength(uint32_t key_id);
39 extern int KEY_CheckKeyLength(uint32_t key_id);
40 extern int KEY_GetKeyInfo(uint32_t key_id, int *type, int *bits);
41
42 extern int KEY_GenerateAuth(uint32_t key_id, const void *data, int data_len,
43 unsigned char *auth, int auth_len);
44 extern int KEY_CheckAuth(uint32_t key_id, const void *data, int data_len,
45 const unsigned char *auth, int auth_len, int trunc_len);
46
47 #endif /* GOT_KEYS_H */