summaryrefslogtreecommitdiffstats
path: root/lib/base64.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lib: fix base64 encodingIgor Ryzhov2024-02-191-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove adding of line feeds when encondig. We're using these functions only for encoding binary data for storing in YANG data tree. According to RFC 7950, section 9.8.2: ``` 9.8.2. Lexical Representation Binary values are encoded with the base64 encoding scheme (see Section 4 in [RFC4648]). ``` According to mentioned RFC 4648, section 3.1: ``` Implementations MUST NOT add line feeds to base-encoded data unless the specification referring to this document explicitly directs base encoders to add line feeds after a specific number of characters. ``` Therefore, line feeds must not be added to the encoded data. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* build: add -Wimplicit-fallthroughIgor Ryzhov2023-10-121-5/+8
| | | | | | | | | | Also: - replace all /* fallthrough */ comments with portable fallthrough; pseudo keyword to accomodate both gcc and clang - add missing break; statements as required by older versions of gcc - cleanup some code to remove unnecessary fallthrough Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
* *: manual SPDX License ID conversionsDavid Lamparter2023-02-091-0/+1
| | | | | | | | | | The files converted in this commit either had some random misspelling or formatting weirdness that made them escape automated replacement, or have a particularly "weird" licensing setup (e.g. dual-licensed.) This also marks a bunch of "public domain" files as SPDX License "NONE". Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: first header *must* be zebra.h or config.hDavid Lamparter2022-04-041-0/+4
| | | | | | | | This has already been a requirement for Solaris, it is still a requirement for some of the autoconf feature checks to work correctly, and it will be a requirement for `-fms-extensions`. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* isisd: fix #10505 using base64 encodingwhichbug2022-02-221-0/+193
Using base64 instead of the raw string to encode the binary data. Signed-off-by: whichbug <whichbug@github.com>