aboutsummaryrefslogtreecommitdiff
path: root/src/lib/encoding
AgeCommit message (Collapse)Author
2021-07-06Merge branch 'maint-0.4.5' into maint-0.4.6George Kadianakis
2021-07-06Use native timegm when available.Nick Mathewson
Continue having a tor_gmtime_impl() unit test so that we can detect any problems in our replacement function; add a new test function to make sure that gmtime<->timegm are a round-trip on now-ish times. This is a fix for bug #40383, wherein we ran into trouble because tor_timegm() does not believe that time_t should include a count of leap seconds, but FreeBSD's gmtime believes that it should. This disagreement meant that for a certain amount of time each day, instead of calculating the most recent midnight, our voting-schedule functions would calculate the second-most-recent midnight, and lead to an assertion failure. I am calling this a bugfix on 0.2.0.3-alpha when we first started calculating our voting schedule in this way.
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2020-11-12Fix typos.Samanta Navarro
Typos found with codespell. Please keep in mind that this should have impact on actual code and must be carefully evaluated: src/core/or/lttng_circuit.inc - ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER) + ctf_enum_value("CONTROLLER", CIRCUIT_PURPOSE_CONTROLLER)
2020-05-08Improve logging of included config filesDaniel Pinto
2020-03-30Merge branch 'tor-github/pr/1775'David Goulet
2020-03-11Merge branch 'bug33032_042' into bug33032_043Nick Mathewson
2020-03-11Merge branch 'bug33032_041' into bug33032_042Nick Mathewson
2020-03-11Merge branch 'maint-0.4.1' into bug33032_041Nick Mathewson
2020-03-11pem_decode(): Tolerate CRLF line endingsNick Mathewson
Fixes bug 33032; bugfix on 0.3.5.1-alpha when we introduced our own PEM decoder.
2020-03-05Add a config_lines_partition() function to help with LINELIST_V.Nick Mathewson
This function works a little bit like strsep(), to get a chunk of configuration lines with a given header. We can use this to make hidden service config easier to parse.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-12-08add KV_RAW to kvline.cTaylor Yu
Add the KV_RAW flag to kvline_encode(). This allows generation of output that is compatible with some quirks of the control protocol. Part of #30984.
2019-12-08clean up kvline_can_encode_lines()Taylor Yu
Add a check for '=' characters in needs_escape(). This simplifies the logic in kvline_can_encode_lines(). Part of #30984.
2019-11-15Doxygen: rename all .dox files to end with .mdNick Mathewson
Using a standard ending here will let other tools that expect markdown understand our output here. This commit was automatically generated with: for fn in $(find src -name '*.dox'); do \ git mv "$fn" "${fn%.dox}.md"; \ done
2019-11-15Doxygen: remove /** and **/ from all .dox filesNick Mathewson
This is an automatically generated commit, made with: find src -name '*.dox' | \ xargs perl -i -ne 'print unless (m#^\s*/?\*\*/?\s*$#);'
2019-11-04Doxygen: Avoid ambiguity in @dir directivesNick Mathewson
This commit was automatically generated with: find src -name '*.dox' |xargs perl -i -pe 's{\@dir ([^/])}{\@dir /$1};'
2019-11-04doxygen: Take "lib" descriptions from doc/HACKING/design.Nick Mathewson
This commit takes descriptions for src/lib and moves them into our doxygen hierarchy. I've covered everything from lib/cc through lib/sandbox here.
2019-11-04Add stub directory-level documentation for most source directoriesNick Mathewson
This includes app, core, feature, lib, and tools, but excludes ext, test, and trunnel. This was generated by the following shell script: cd src for dname in $(find lib core feature app tools -type d |grep -v \\.deps$); do keyword="$(echo "$dname" |sed -e "s/\//_/" )" target="${dname}/${keyword}.dox" echo "$target" cat <<EOF >"$target" /** @dir ${dname} @brief ${dname} **/ EOF git add "$target" done
2019-10-16Doxygen: fix warnings about mismatched HTML tags.Nick Mathewson
2019-07-03Make config_lines_eq() take const arguments.Nick Mathewson
2019-07-03Revert "Add a function to append an existing line to a config line list."Nick Mathewson
This reverts commit 5a2ab886baaa125fe715acca8f7daf35031855aa.
2019-06-24Add a function to append an existing line to a config line list.Nick Mathewson
We had an existing function to do this, but it took a pair of strings rather than a line.
2019-06-05Run "make autostyle."Nick Mathewson
2019-05-02Add comments to include.am files to note where new sources goNick Mathewson
This mechanism isn't perfect, and sometimes it will guess wrong, but it will help our automation.
2019-04-25Add rudimentary qstring support to kvline.cNick Mathewson
2019-04-25Move and rename decode_escaped_string()Nick Mathewson
This function decodes something different from the usual c-escaped format. It is only used in controller authorization.
2019-04-25Add a case-insensitive variant to config_line_find()Nick Mathewson
2019-04-25kvline: handle empty alues as well as empty keysNick Mathewson
The two options are mutually exclusive, since otherwise an entry like "Foo" would be ambiguous. We want to have the ability to treat entries like this as keys, though, since some controller commands interpret them as flags.
2019-04-05binascii: Fix the base64_encode_nopad() buffer length requirementteor
Comment-only change. Part of 29660.
2019-02-26Merge branch 'tor-github/pr/611'George Kadianakis
2019-01-23Merge branch 'ticket28668_035' into ticket28668_040Nick Mathewson
2019-01-23Capture more BUG warnings in util/time testNick Mathewson
These are ones that happen on windows only. Fixes bug 29161.
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2018-12-20base32_decode(): Return number of bytes written on success.Nick Mathewson
This makes it consistent with base64_decode(). Closes ticket 28913.
2018-12-14Add a function to provide an upper bound on base64 decoded lengthNick Mathewson
2018-12-12Add code to parse K=V lines into config_line_t format.Nick Mathewson
Closes ticket 28755
2018-11-06Include sys/time.h in timers.c and time_fmt.cKris Katterjohn
This fixes compilation on OpenBSD. Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
2018-09-13Merge remote-tracking branch 'UntoSten/inform-about-conf-includes'Nick Mathewson
2018-08-21Add rudimentary support for PEM-encoding, since NSS doesn't do that.Nick Mathewson
2018-08-17Inform users about configuration file and directory includesUnto Sten
This patch makes it clearer to users what settings Tor daemon is actually using. I think it is pretty important.
2018-07-10Rename tm_cvt to time_to_tmNick Mathewson
2018-07-10Rename torlog.[ch] to log.[ch]Nick Mathewson
Fun fact: these files used to be called log.[ch] until we ran into conflicts with systems having a log.h file. But now that we always include "lib/log/log.h", we should be fine.
2018-07-10Rename util_malloc to malloc.Nick Mathewson
2018-07-09Fix some lingering windows compilation issues from Jenkins.Nick Mathewson
These were caused by the recent refactoring.
2018-07-01File-level documentation for some of src/lib.Nick Mathewson
2018-07-01Tabify all of the .am files.Nick Mathewson
2018-06-28Move string_is_key_value to lib/encodingNick Mathewson
2018-06-27Move confline.c to lib/encoding: it is about encoding key-value pairsNick Mathewson
Also, move "unescape_string()" to encoding too, since it's about encoding data as C strings.