Commit graph

19 commits

Author SHA1 Message Date
David Lamparter acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
Loganaden Velvindron 04b4b595d3 lib/md5,lib/sha256: Use explicit_bzero to clean up sensitive data.
explicit_bzero() is available as an API to clean up sensitive data
and avoid compiler optimizations that remove calls to memset() or bzero().

Signed-off-by: Loganaden Velvindron <logan@cyberstorm.mu>
2022-05-31 18:00:18 +04:00
Donatas Abraitis c4efd0f423 *: Do not cast to the same type
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-04-08 17:15:06 +03:00
Donatas Abraitis 0d6f7fd6fd *: Replace sizeof something to sizeof(something)
Satisfy checkpatch.pl requirements (check for sizeof without parenthesis)

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-03-08 21:44:53 +02:00
Ruben Kerkhof 4d762f2607 Treewide: use ANSI function definitions
Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2019-01-24 11:21:59 +01:00
Donald Sharp a7ea39668d *: Remove cvs control points
The $Id: lines would allow code kept in cvs to substitute
the file version upon checkout.  Since we are not using
cvs there is no need to keep these lines anymore.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-12-05 17:28:12 -05:00
David Lamparter 9d303b37d7 Revert "*: reindent pt. 2"
This reverts commit c14777c6bf.

clang 5 is not widely available enough for people to indent with.  This
is particularly problematic when rebasing/adjusting branches.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-22 14:52:33 +02:00
whitespace / reindent c14777c6bf
*: reindent pt. 2
w/ clang 5

* reflow comments
* struct members go 1 per line
* binpack algo was adjusted
2017-07-17 15:26:02 -04:00
whitespace / reindent d62a17aede *: reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17 14:04:07 +02:00
David Lamparter f2bce9a5b3 *: fix signedness mix-ups
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 21401f3215be26dcb0f787105f5907745498e966)
2016-06-07 08:47:49 -04:00
Donald Sharp 24873f0c06 lib: lib-warnings.patch
Remove compile warnings for the lib directory
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:
2015-05-19 18:04:26 -07:00
Fritz Reichmann e6b03b7776 isisd: implement MD5 circuit authentication
* Replace command "isis passwd" with "isis passwd {clear|md5}"
* Verify HMAC MD5 on ISIS Hello PDUs
* Add HMAC MD5 authentication to md5.h/md5.c from RFC2104
2012-02-14 03:06:36 +04:00
Stephen Hemminger 3949a60c35 lib: fix warning on little endian
* md5.c
  * md5_calc(): If building on little endian then X
    will be 'const uint32_t' which causes compiler
    warning in code that never gets used. Just move
    the endif to make sure code is not checked.
2009-12-09 14:13:27 +03:00
vincent eac314c7c4 2006-01-17 Vincent Jardin <vincent.jardin@6wind.com>
* md5.c: Don't forget to keep const.
        * regex.c: Cleanup code and remove warnings.
2006-01-17 23:39:04 +00:00
paul 7d0b0c4b7f [lib/md5] md5_loop should take void pointer for more useful caller warnings.
2006-01-17 Paul Jakma <paul.jakma@sun.com>

	* md5.{c,h}: (md5_loop) Is better off taking a void * and doing
	  cast to byte wise type internally, avoids needs for casts
	  in users.
2006-01-17 17:40:45 +00:00
paul 34204aac42 2005-11-03 Paul Jakma <paul.jakma@sun.com>
* zebra.h: BSD BYTE_ORDER define isn't available everywhere,
	  define if needs be.
	* checksum.h: new file. checksum.c exports in_cksum, provide
	  a header for it.
	* checksum.c: (in_cksum) callers shouldn't have to know it uses
	  a u_short internally, change to void *.
	* Makefile.am: Add checksum.h
	* command.h: remove bogus trailling slash.
	* md5.c: (general) Update it for the twentieth century. ANSI
	  declarations are widely supported now.. Don't include system
	  headers, only include zebra.h. Use POSIX types (the
	  alternative is to define u_int64_t in a portable way - rest
	  of Quagga needs same cleanup).
	  Make endian-conditional code be compiler conditional rather
	  than preprocessor conditional, so that breakage gets noticed
	  quicker.
	* md5.h: POSIX types. Get rid of the odd __P() non-ANSI capable
	  compiler compatibility hack.
2005-11-03 09:00:23 +00:00
vincent c1a03d4774 2005-09-28 Alain Ritoux <alain.ritoux@6wind.com>
* lib/md5-gnu.h: removed
    * lib/md5.h: replaces md5-gnu.h
    * lib/Makefile.am: use correct md5.h
    * lib/md5.c: import from WIDE
    * ospfd/ospf_packet.c: use new md5 API
    * ripd/ripd.c: use new md5 API
2005-09-28 15:47:44 +00:00
paul 8cc4198f9f 2005-05-06 Paul Jakma <paul@dishone.st>
* (general) extern and static'ification of functions in code and
	  header.
	  Cleanup any definitions with unspecified arguments.
	  Add casts for callback assignments where the callback is defined,
	  typically, as passing void *, but the function being assigned has
	  some other pointer type defined as its argument, as gcc complains
	  about casts from void * to X* via function arguments.
	  Fix some old K&R style function argument definitions.
	  Add noreturn gcc attribute to some functions, as appropriate.
	  Add unused gcc attribute to some functions (eg ones meant to help
	  while debugging)
	  Add guard defines to headers which were missing them.
	* command.c: (install_node) add const qualifier, still doesnt shut
	  up the warning though, because of the double pointer.
	  (cmp_node) ditto
	* keychain.c: (key_str2time) Add GET_LONG_RANGE() macro, derived
	  fromn vty.h ones to fix some of the (long) < 0 warnings.
	* thread.c: (various) use thread_empty
	  (cpu_record_hash_key) should cast to uintptr_t, a stdint.h type
	* vty.h: Add VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX so they
	  removed from ospfd/ospf_vty.h
	* zebra.h: Move definition of ZEBRA_PORT to here, to remove
	  dependence of lib on zebra/zserv.h
2005-05-06 21:25:49 +00:00
paul 718e374419 Initial revision 2002-12-13 20:15:29 +00:00