[Git][NTPsec/ntpsec][master] The crypto command becomes the nts command.

Eric S. Raymond gitlab at mg.gitlab.com
Sun Feb 10 02:28:25 UTC 2019


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
5cd9eb05 by Eric S. Raymond at 2019-02-10T02:28:14Z
The crypto command becomes the nts command.

- - - - -


4 changed files:

- include/ntp_config.h
- ntpd/keyword-gen.c
- ntpd/ntp_config.c
- ntpd/ntp_parser.y


Changes:

=====================================
include/ntp_config.h
=====================================
@@ -196,7 +196,7 @@ struct config_tree_tag {
 	addr_opts_fifo *fudge;
 	attr_val_fifo *	rlimit;
 	attr_val_fifo *	tinker;
-	attr_val_fifo *	crypto;
+	attr_val_fifo *	nts;
 	attr_val_fifo *	enable_opts;
 	attr_val_fifo *	disable_opts;
 


=====================================
ntpd/keyword-gen.c
=====================================
@@ -203,7 +203,6 @@ struct key_tok ntp_keywords[] = {
 { "expire",		T_Expire,		FOLLBY_TOKEN },
 { "cert",		T_Cert,			FOLLBY_TOKEN },
 { "ca",			T_Ca,			FOLLBY_TOKEN },
-{ "crypto",		T_Crypto,		FOLLBY_TOKEN },
 { "mintls",		T_Mintls,		FOLLBY_TOKEN },
 { "maxtls",		T_Maxtls,		FOLLBY_TOKEN },
 { "tlsciphers",		T_Tlsciphers,		FOLLBY_STRING },


=====================================
ntpd/ntp_config.c
=====================================
@@ -209,7 +209,7 @@ static void free_config_rlimit(config_tree *);
 static void free_config_setvar(config_tree *);
 static void free_config_system_opts(config_tree *);
 static void free_config_tinker(config_tree *);
-static void free_config_crypto(config_tree *);
+static void free_config_nts(config_tree *);
 static void free_config_tos(config_tree *);
 static void free_config_unpeers(config_tree *);
 static void free_config_vars(config_tree *);
@@ -267,7 +267,7 @@ static void config_monitor(config_tree *);
 static void config_rlimit(config_tree *);
 static void config_system_opts(config_tree *);
 static void config_tinker(config_tree *);
-static void config_crypto(config_tree *);
+static void config_nts(config_tree *);
 static void config_tos(config_tree *);
 static void config_logfile(config_tree *);
 static void config_vars(config_tree *);
@@ -357,7 +357,7 @@ free_config_tree(
 	free_config_monitor(ptree);
 	free_config_access(ptree);
 	free_config_tinker(ptree);
-	free_config_crypto(ptree);
+	free_config_nts(ptree);
 	free_config_rlimit(ptree);
 	free_config_system_opts(ptree);
 	free_config_logconfig(ptree);
@@ -1979,26 +1979,26 @@ config_tinker(
 }
 
 static void
-config_crypto(
+config_nts(
 	config_tree *ptree
 	)
 {
-	attr_val *	crypto;
+	attr_val *	nts;
 
-	crypto = HEAD_PFIFO(ptree->crypto);
-	for (; crypto != NULL; crypto = crypto->link) {
-		switch (crypto->attr) {
+	nts = HEAD_PFIFO(ptree->nts);
+	for (; nts != NULL; nts = nts->link) {
+		switch (nts->attr) {
 
 		default:
 			INSIST(0);
 			break;
 
 		case T_Ca:
-			ntsconfig.ca = estrdup(crypto->value.s);
+			ntsconfig.ca = estrdup(nts->value.s);
 			break;
 
 		case T_Cert:
-			ntsconfig.cert = estrdup(crypto->value.s);
+			ntsconfig.cert = estrdup(nts->value.s);
 			break;
 
 		case T_Disable:
@@ -2010,19 +2010,19 @@ config_crypto(
 			break;
 
 		case T_Maxtls:
-			ntsconfig.maxtls = crypto->value.d;
+			ntsconfig.maxtls = nts->value.d;
 			break;
 
 		case T_Mintls:
-			ntsconfig.mintls = crypto->value.d;
+			ntsconfig.mintls = nts->value.d;
 			break;
 
 		case T_Tlsciphers:
-			ntsconfig.tlsciphers = estrdup(crypto->value.s);
+			ntsconfig.tlsciphers = estrdup(nts->value.s);
 			break;
 
 		case T_Tlsciphersuites:
-			ntsconfig.tlsciphersuites = estrdup(crypto->value.s);
+			ntsconfig.tlsciphersuites = estrdup(nts->value.s);
 			break;
 		}
 	}
@@ -2047,11 +2047,11 @@ free_config_tinker(
 
 
 static void
-free_config_crypto(
+free_config_nts(
 	config_tree *ptree
 	)
 {
-	FREE_ATTR_VAL_FIFO(ptree->crypto);
+	FREE_ATTR_VAL_FIFO(ptree->nts);
 }
 
 
@@ -3036,7 +3036,7 @@ config_ntpd(
 	config_tos(ptree);
 	config_access(ptree);
 	config_tinker(ptree);
-	config_crypto(ptree);
+	config_nts(ptree);
 	config_rlimit(ptree);
 	config_system_opts(ptree);
 	config_logconfig(ptree);


=====================================
ntpd/ntp_parser.y
=====================================
@@ -68,7 +68,6 @@
 %token	<Integer>	T_Clockstats
 %token	<Integer>	T_Cohort
 %token	<Integer>	T_ControlKey
-%token	<Integer>	T_Crypto
 %token	<Integer>	T_Ctl
 %token	<Integer>	T_Day
 %token	<Integer>	T_Default
@@ -296,10 +295,10 @@
 %type	<Integer>	tinker_option_keyword
 %type	<Attr_val>	tinker_option
 %type	<Attr_val_fifo>	tinker_option_list
-%type	<Integer>	crypto_int_option_keyword
-%type	<Integer>	crypto_string_option_keyword
-%type	<Attr_val>	crypto_option
-%type	<Attr_val_fifo>	crypto_option_list
+%type	<Integer>	nts_int_option_keyword
+%type	<Integer>	nts_string_option_keyword
+%type	<Attr_val>	nts_option
+%type	<Attr_val_fifo>	nts_option_list
 %type	<Attr_val>	tos_option
 %type	<Integer>	tos_option_dbl_keyword
 %type	<Integer>	tos_option_int_keyword
@@ -350,7 +349,7 @@ command :	/* NULL STATEMENT */
 	|	rlimit_command
 	|	system_option_command
 	|	tinker_command
-	|	crypto_command
+	|	nts_command
 	|	miscellaneous_command
 	;
 
@@ -1100,32 +1099,32 @@ tinker_option_keyword
 	;
 
 
-/* Crypto Commands
+/* NTS Commands
  * ---------------
  */
 
-crypto_command
-	:	T_Crypto crypto_option_list
-			{ CONCAT_G_FIFOS(cfgt.crypto, $2); }
+nts_command
+	:	T_Nts nts_option_list
+			{ CONCAT_G_FIFOS(cfgt.nts, $2); }
 	;
 
-crypto_option_list
-	:	crypto_option_list crypto_option
+nts_option_list
+	:	nts_option_list nts_option
 		{
 			$$ = $1;
 			APPEND_G_FIFO($$, $2);
 		}
-	|	crypto_option
+	|	nts_option
 		{
 			$$ = NULL;
 			APPEND_G_FIFO($$, $1);
 		}
 	;
 
-crypto_option
-	:	crypto_int_option_keyword number
+nts_option
+	:	nts_int_option_keyword number
 			{ $$ = create_attr_dval($1, $2); }
-	|	crypto_string_option_keyword T_String
+	|	nts_string_option_keyword T_String
 			{ $$ = create_attr_sval($1, $2); }
 	|	T_Disable
 			{ $$ = create_attr_ival($1, 0); }
@@ -1133,12 +1132,12 @@ crypto_option
 			{ $$ = create_attr_ival($1, 1); }
 	;
 
-crypto_int_option_keyword
+nts_int_option_keyword
 	:	T_Maxtls
 	|	T_Mintls
 	;
 
-crypto_string_option_keyword
+nts_string_option_keyword
 	:	T_Ca
 	|	T_Cert
 	|	T_Tlsciphers



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5cd9eb05ea192ad016472fa52fcc3d8dcbef0dd5

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5cd9eb05ea192ad016472fa52fcc3d8dcbef0dd5
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/20190210/5c256cc5/attachment-0001.html>


More information about the vc mailing list