mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 19:45:07 -05:00
nts: add NTS-KE server and client
Add a client and server implementing the Network Time Security (NTS) Key Establishment. Use the GnuTLS library for TLS.
This commit is contained in:
42
nts_ke_server.h
Normal file
42
nts_ke_server.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
chronyd/chronyc - Programs for keeping computer clocks accurate.
|
||||
|
||||
**********************************************************************
|
||||
* Copyright (C) Miroslav Lichvar 2020
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* 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 along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
**********************************************************************
|
||||
|
||||
=======================================================================
|
||||
|
||||
Header file for the NTS-KE server
|
||||
*/
|
||||
|
||||
#ifndef GOT_NTS_KE_SERVER_H
|
||||
#define GOT_NTS_KE_SERVER_H
|
||||
|
||||
#include "nts_ke.h"
|
||||
|
||||
/* Init and fini functions */
|
||||
extern void NKS_Initialise(int scfilter_level);
|
||||
extern void NKS_Finalise(void);
|
||||
|
||||
/* Generate a new NTS cookie containing the C2S and S2C keys */
|
||||
extern int NKS_GenerateCookie(NKE_Key *c2s, NKE_Key *s2c, NKE_Cookie *cookie);
|
||||
|
||||
/* Validate a cookie and extract the C2S and S2C keys */
|
||||
extern int NKS_DecodeCookie(NKE_Cookie *cookie, NKE_Key *c2s, NKE_Key *s2c);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user