[Git][NTPsec/ntpsec][master] Dependency reduction.
Eric S. Raymond
gitlab at mg.gitlab.com
Wed Feb 13 00:28:43 UTC 2019
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
1a47ea21 by Eric S. Raymond at 2019-02-13T00:28:10Z
Dependency reduction.
- - - - -
4 changed files:
- include/nts.h
- include/nts_lib.h
- ntpd/nts_client.c
- ntpd/nts_server.c
Changes:
=====================================
include/nts.h
=====================================
@@ -53,6 +53,65 @@ struct ntsconfig_t {
char *cert; /* site default */
};
+/* NTS protocol constants */
+
+#define CRITICAL 0x8000
+enum record_type {
+ end_of_message = 0, /* CRITICAL */
+ next_protocol_negotiation = 1, /* CRITICAL */
+ error = 2, /* CRITICAL */
+ warning = 3,
+ algorithm_negotiation = 4,
+ new_cookie = 5,
+ server_negotiation = 6,
+ port_negotiation = 7
+};
+
+enum errors_type {
+ unrecognized_critical_section = 0,
+ bad_request = 1
+};
+
+enum aead_ciphers {
+ AEAD_AES_128_GCM = 1,
+ AEAD_AES_256_GCM = 2,
+ AEAD_AES_128_CCM = 3,
+ AEAD_AES_256_CCM = 4,
+
+ AEAD_AES_128_GCM_8 = 5,
+ AEAD_AES_256_GCM_8 = 6,
+ AEAD_AES_128_GCM_12 = 7,
+ AEAD_AES_256_GCM_12 = 8,
+
+ AEAD_AES_128_CCM_SHORT = 9,
+ AEAD_AES_256_CCM_SHORT = 10,
+ AEAD_AES_128_CCM_SHORT_8 = 11,
+ AEAD_AES_256_CCM_SHORT_8 = 12,
+ AEAD_AES_128_CCM_SHORT_12 = 13,
+ AEAD_AES_256_CCM_SHORT_12 = 14,
+
+ AEAD_AES_SIV_CMAC_256 = 15,
+ AEAD_AES_SIV_CMAC_384 = 16,
+ AEAD_AES_SIV_CMAC_512 = 17,
+
+ AEAD_AES_128_CCM_8 = 18,
+ AEAD_AES_256_CCM_8 = 19,
+
+ AEAD_AES_128_OCB_TAGLEN128 = 20,
+ AEAD_AES_128_OCB_TAGLEN96 = 21,
+ AEAD_AES_128_OCB_TAGLEN64 = 22,
+ AEAD_AES_192_OCB_TAGLEN128 = 23,
+ AEAD_AES_192_OCB_TAGLEN96 = 24,
+ AEAD_AES_192_OCB_TAGLEN64 = 25,
+ AEAD_AES_256_OCB_TAGLEN128 = 26,
+ AEAD_AES_256_OCB_TAGLEN96 = 27,
+ AEAD_AES_256_OCB_TAGLEN64 = 28,
+
+ AEAD_CHACHA20_POLY1305 = 29
+};
+
+
+
extern struct ntsconfig_t ntsconfig;
int get_key_length(int aead);
=====================================
include/nts_lib.h
=====================================
@@ -5,6 +5,8 @@
#include <openssl/evp.h>
#include <stdbool.h>
+#include "nts.h"
+
typedef struct {
void *key_c2s;
void *key_s2c;
@@ -43,61 +45,6 @@ typedef struct {
bool critical;
} record_bits;
-#define CRITICAL 0x8000
-enum record_type {
- end_of_message = 0, /* CRITICAL */
- next_protocol_negotiation = 1, /* CRITICAL */
- error = 2, /* CRITICAL */
- warning = 3,
- algorithm_negotiation = 4,
- new_cookie = 5,
- server_negotiation = 6,
- port_negotiation = 7
-};
-
-enum errors_type {
- unrecognized_critical_section = 0,
- bad_request = 1
-};
-
-enum aead_ciphers {
- AEAD_AES_128_GCM = 1,
- AEAD_AES_256_GCM = 2,
- AEAD_AES_128_CCM = 3,
- AEAD_AES_256_CCM = 4,
-
- AEAD_AES_128_GCM_8 = 5,
- AEAD_AES_256_GCM_8 = 6,
- AEAD_AES_128_GCM_12 = 7,
- AEAD_AES_256_GCM_12 = 8,
-
- AEAD_AES_128_CCM_SHORT = 9,
- AEAD_AES_256_CCM_SHORT = 10,
- AEAD_AES_128_CCM_SHORT_8 = 11,
- AEAD_AES_256_CCM_SHORT_8 = 12,
- AEAD_AES_128_CCM_SHORT_12 = 13,
- AEAD_AES_256_CCM_SHORT_12 = 14,
-
- AEAD_AES_SIV_CMAC_256 = 15,
- AEAD_AES_SIV_CMAC_384 = 16,
- AEAD_AES_SIV_CMAC_512 = 17,
-
- AEAD_AES_128_CCM_8 = 18,
- AEAD_AES_256_CCM_8 = 19,
-
- AEAD_AES_128_OCB_TAGLEN128 = 20,
- AEAD_AES_128_OCB_TAGLEN96 = 21,
- AEAD_AES_128_OCB_TAGLEN64 = 22,
- AEAD_AES_192_OCB_TAGLEN128 = 23,
- AEAD_AES_192_OCB_TAGLEN96 = 24,
- AEAD_AES_192_OCB_TAGLEN64 = 25,
- AEAD_AES_256_OCB_TAGLEN128 = 26,
- AEAD_AES_256_OCB_TAGLEN96 = 27,
- AEAD_AES_256_OCB_TAGLEN64 = 28,
-
- AEAD_CHACHA20_POLY1305 = 29
-};
-
extern uint8_t *upf(void *src, void *dest, size_t n);
extern int nts_record_form(record_bits *in);
=====================================
ntpd/nts_client.c
=====================================
@@ -23,7 +23,7 @@
#include "ntp_types.h"
#include "ntpd.h"
-#include "nts_lib.h"
+#include "nts.h"
int open_TCP_socket(const char *hostname);
=====================================
ntpd/nts_server.c
=====================================
@@ -18,7 +18,7 @@
#include "ntp.h"
#include "ntpd.h"
#include "ntp_stdlib.h"
-#include "nts_lib.h"
+#include "nts.h"
static int create_listener(int port);
static void* nts_ke_listener(void*);
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/1a47ea21f711916eb35cc672b04da14636e745f7
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/1a47ea21f711916eb35cc672b04da14636e745f7
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20190213/d66f139b/attachment-0001.html>
More information about the vc
mailing list