[Git][NTPsec/ntpsec][master] 3 commits: Remove redundant check for openssl/cmac.h, fixes #492

Hal Murray gitlab at mg.gitlab.com
Mon Jun 18 23:13:38 UTC 2018


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
9ca85fbb by Hal Murray at 2018-06-18T22:40:53Z
Remove redundant check for openssl/cmac.h, fixes #492

- - - - -
b65dc762 by Hal Murray at 2018-06-18T23:11:53Z
Remove inlines that were generating warnings on old systems.

- - - - -
6629cc6e by Hal Murray at 2018-06-18T23:12:41Z
Tweak doc and comment, fixes #491

- - - - -


4 changed files:

- docs/authentic.txt
- ntpd/ntp_monitor.c
- ntpd/ntp_proto.c
- wscript


Changes:

=====================================
docs/authentic.txt
=====================================
--- a/docs/authentic.txt
+++ b/docs/authentic.txt
@@ -158,7 +158,7 @@ a bogus crypto-NAK.
 from the OpenSSL project.  MD5 digests are 16 bytes.  SHA1 digests are 20 bytes.
 Longer digests are truncated.
 
-+ntpd+'s mode can use any cypher with a CBC mode that is supported by
++ntpd+'s CMAC mode can use any cipher with a CBC mode that is supported by
 libcrypto from the OpenSSL project.  AES is short for AES-128.
 AES needs a 16 byte key.  Longer keys are truncated.  Shorter
 keys are padded with 0s.  AES MACs are 16 bytes long.  MACs longer


=====================================
ntpd/ntp_monitor.c
=====================================
--- a/ntpd/ntp_monitor.c
+++ b/ntpd/ntp_monitor.c
@@ -73,10 +73,10 @@ static	uint64_t mon_mem_increments;	/* times called malloc() */
 int	ntp_minpkt = NTP_MINPKT;	/* minimum (log 2 s) */
 uint8_t	ntp_minpoll = NTP_MINPOLL;	/* increment (log 2 s) */
 
-static	void		mon_getmoremem(void);
-static	void		remove_from_hash(mon_entry *);
-static	inline void	mon_free_entry(mon_entry *);
-static	inline void	mon_reclaim_entry(mon_entry *);
+static	void	mon_getmoremem(void);
+static	void	remove_from_hash(mon_entry *);
+static	void	mon_free_entry(mon_entry *);
+static	void	mon_reclaim_entry(mon_entry *);
 
 /*
  * init_mon - initialize monitoring global data
@@ -113,7 +113,7 @@ remove_from_hash(
 }
 
 
-static inline void
+static void
 mon_free_entry(
 	mon_entry *m
 	)
@@ -132,7 +132,7 @@ mon_free_entry(
  * remove_from_hash(), mru_entries is decremented.  It is the caller's
  * responsibility to increment it again.
  */
-static inline void
+static void
 mon_reclaim_entry(
 	mon_entry *m
 	)


=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -2089,7 +2089,7 @@ peer_xmit(
 	xpkt.rec = htonl_fp(peer->dst);
 
 	/*
-	 * If the peer (aka server) was configured with a key authenticate
+	 * If the peer (aka server) was configured with a key, authenticate
 	 * the packet.  Else, the packet is not authenticated.
 	 */
 	sendlen = LEN_PKT_NOMAC;


=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -607,6 +607,10 @@ int main(int argc, char **argv) {
         msg="Checking for OpenSSL (via pkg-config)",
         define_name='', mandatory=False,
     ):
+    # Very old versions of OpenSSL don't have cmac support.
+    # This gives a sane(er) error message.
+    # It would be possible to make CMAC support optional by adding
+    # appropriate #ifdefs to the code.
         openssl_headers = (
             "openssl/evp.h",
             "openssl/cmac.h",
@@ -662,13 +666,6 @@ int main(int argc, char **argv) {
     ctx.check_cc(header_name="stdbool.h", mandatory=True,
                  comment="Sanity check.")
 
-    # Very old versions of OpenSSL don't have cmac support.
-    # This gives a sane(er) error message.
-    # It would be possible to make CMAC support optional by adding
-    # appropriate #ifdefs to the code.
-    ctx.check_cc(header_name="openssl/cmac.h", mandatory=True,
-                 comment="Sanity check.")
-
     # This is a list of every optional include header in the
     # codebase that is guarded by a directly corresponding HAVE_*_H symbol.
     #



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/258c0c7dca210d6a1906e554784a266b2e408d32...6629cc6e1b5d43d60345b3410a414f1da1753ec1

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/258c0c7dca210d6a1906e554784a266b2e408d32...6629cc6e1b5d43d60345b3410a414f1da1753ec1
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/20180618/c58e091e/attachment.html>


More information about the vc mailing list