summaryrefslogtreecommitdiff
path: root/lib/base64.h
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-02-19 15:35:22 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2024-02-19 15:35:22 +0200
commit77149fabaa0bfdae4d8a55e14ce650705584e64a (patch)
treeb72500882652517e0eeeaf307e98398b9a99eca2 /lib/base64.h
parent29a0c1c6c340fea5315584e51812b65b17bdb175 (diff)
lib: fix base64 encoding
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>
Diffstat (limited to 'lib/base64.h')
-rw-r--r--lib/base64.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/base64.h b/lib/base64.h
index 839f92aa7c..9bf4ace82f 100644
--- a/lib/base64.h
+++ b/lib/base64.h
@@ -14,7 +14,6 @@ enum base64_encodestep {
struct base64_encodestate {
enum base64_encodestep step;
char result;
- int stepcount;
};
void base64_init_encodestate(struct base64_encodestate *state_in);